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