Friday, February 8, 2019

php - .htaccess issue with folder

I have an .htaccess file in my root directory with the following contents:




RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://website.com/$1 [R=301,L]
DirectoryIndex index.php
Options -Indexes


Works perfect in the root.



The problem is with subfolders. If I manually go to:

http://www.website.com/myfolder
it pushes me to:
https://website.com/myfolder/.php (404 error)



My goal is to always remove the "www" and redirect to SSL for the root and all subfolders. Obviously without the above error where it somehow leaves the ".php"



Please help!



Thanks!

No comments:

Post a Comment

plot explanation - Why did Peaches' mom hang on the tree? - Movies & TV

In the middle of the movie Ice Age: Continental Drift Peaches' mom asked Peaches to go to sleep. Then, she hung on the tree. This parti...