I’m new to this modrewrite beast. I managed to get it working and I can normaly load index.php as index.html for example.
Problem is when I try to navigate to index2.html and I get error 404 error, The requested URL /index2.php was not found on this server.
I have this code in my .htaccess:
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^(.*)\.html$ $1.php [nc]
I’ve tryed few things, but I just get caught in the loop.
Basicaly I want rewriting from PHP to HTML, but I want to see the files which are actually HTML work aswell.
My 2nd question, perhaps most important is, how good is that in SEO terms, is it just as normal or are there any downsides of using such rewrite rules?
Try adding a condition for
-fThis checks to make sure the the file exists as a php before rewriting
As for your second question, it doesn’t make a big difference either way, whether extensions are html or php. Its mainly so it appears you’re serving static content.