0

I have the following to remove *.php extensions:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]

RewriteCond %{REQUEST_URI} index\.php
RewriteRule ^(.*)index\.php$ $1 [R=301,L]

The problem is that now I've installed an ssl certificate and its not working for subdirectories.

https://www.site.com WORKING(200)
https://www.site.com/example NOT WORKING (404)
https://www.site.com/example.php WORKING(200)

Can somebody help me?

dan
  • 990
  • 1
  • 14
  • 22
  • 1
    sorry for faulty answer my bad. [try this one](http://stackoverflow.com/questions/9635524/remove-php-extensions-with-htaccess-without-breaking-directoryindex) – Laci K Oct 23 '14 at 01:18
  • it did not work... if I try accessing a subdirectory with https then I get 404 (page not found) – dan Oct 23 '14 at 01:25
  • is `+FollowSymLinks` enabled by default on your host? if not use `Option +FollowSymLinks` at the begining of the file it might not make any diferrence but worth a try. – Laci K Oct 23 '14 at 01:46
  • unfortunately that did not work either :( – dan Oct 23 '14 at 01:51

1 Answers1

1

After trying almost EVERY possible workaround, I finally found a solution. Just needed to add this to the configuration file of my ssl site:

<Directory path/to/your/site>
  AllowOverride FileInfo
</Directory>

More info here

dan
  • 990
  • 1
  • 14
  • 22