I have created one of my sites mostly manual using .php because my menu's and such are in php since I change them all the time. I'd like to rewrite the urls's to .html such as www.mydomain.com/deep-sea-fishing.php to www.mydomain.com/deep-sea-fishing.html thanks for your help
The .html URL would need to work. Options +Indexes Options +FollowSymlinks RewriteEngine on RewriteBase / RewriteRule ^([^.]+)\.html$ $1.php [L] And you can't have both a mod_rewrite and 301 redirect for the same URLs because it'll loop. Apache says...I want .php, no it's .html, no .php, no....grrrr!!!!
I will say though, that theirs no seo reasoning behind changing from php to html, I don't know why people worry with that. Mod_rewrite is only worth it to get url's without multiple variables.
Or to not show file extensions at all. They are of no value to the visitor, make the url longer (i like short urls) and when you want to change from one implementation to the other you won't have to change all your urls and potentially lose incoming links, break visitor's bookmarks etc. Haven't been able yet to remove aspx file extensions though. MultiViews works great for php files but I think I'll have to use mod_rewrite for aspx files.
Or you can simply name them .html from the start and allow HTML files through your PHP interpreter AddType application/x-httpd-php htm html php AddHandler application/x-httpd-php .htm .html