Tuesday, 1 August 2017

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

casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...