Forum Moderators: phranque
I want to rewrite url:
[xyz.com...]
To->
[xyz.com...]
[xyz.com...]
To ->
[xyz.com...]
Where to put .htaccess file in root folder(in demo)
or in subfolders(contact ,services ,about )
I am writing below code in htaccess file
RewriteEngine on
RewriteBase /
RewriteRule ^(.*)\.html$ $1.php [L]
How to get correct solution?
(([^/]*/)*[^.]+\.html) or similar. You'll also need to link to the new URLs from the links on your pages, and you'll need to make sure that requests for the old URLs are sent a redirect to the new URL. However, there was a much simpler way to do this. You could have used AddHandler to make URLs ending in .html be parsed for PHP scripts. That would have meant you carried on using the same URLs as before. As viewed from the web, nothing would have appeared to have changed.