Hi tried to redirect my .html pages to .php pages... and added the following commands. Does not seem to work... Any help? Options +FollowSymlinks RewriteEngine On RewriteRule ^(.+)\.htm$ http://www.realhitch.com/$1.php [r=301,nc]
Hi, Where did you add these commands ? Also, you wrote "Does not seem to work" : can you be more specific ? Jean-Luc
Edit the .htaccess file as follows: RewriteEngine on RewriteRule ^(.*)\.html$ $1 [C,E=WasHTML:yes] # rewrite to document.php if exists RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^(.*)$ $1.php [S=1] # else reverse the previous basename cutout RewriteCond %{ENV:WasHTML} ^yes$ RewriteRule ^(.*)$ $1.html Code (markup): Your apache configuration must enable the rewrite engine and allow you to invoke it.
Hi guys, thanks! Whihcever I do it does not work, meaning it does not go to the .php pages. Could it be with the host?
If the .htaccess changes suggested above do not work, then your host is not allowing you to do so. You cannot use the RewriteEngine unless mod_rewrite has been enabled and your site has been given the requisite permissions by your host.