Hello everyone.
My problem is like this:
- I now use nginx in front of Apache server wide meaning all my websites
- all the rewrites I have in the .htaccess file work perfect, except 1 and up so far noone managed to give me a solution
This is the .htaccess rule
-------------
RewriteCond %{THE_REQUEST} ^.*/index\.(html|htm)\ HTTP/
RewriteRule ^(.*)index\.(html|htm)$ http://%{HTTP_HOST}/$1 [R=301,L]
-------------
This does the following:
- it redirects with a 301 http code from www.domain.com/index.html to www.domain.com
- it takes both index.html and index.htm
Now the thing is that this worked prior to installing nginx and works so far for index.htm.. it redirects properly.
But index.htm does not exists.
I tried the other way around and found out that if the file exists, the redirect WON'T happen.
Another weird thing that I found is the following: I also have mod_pagespeed installed from Google and when I access the URL with www.domain.com/index.html... the one that DOES NOT rewrite to /, this mod_pagespeed is... inactive.. like that URL is not from the same normal requests.
If you guys have a clue I'd happily share a virtual mug of beer with you for a good piece of info.
Thanks