Forum Moderators: phranque
# CUSTOM 404 ERROR PAGE
ErrorDocument 404 /error404.htm
#
# REDIRECT SHTML AND HTML TO PHP
RewriteEngine on
RewriteBase /
RewriteRule ^(.*)\.shtml$ http://web.com/$1.php [R=302,NC]
RewriteRule ^(.*)\.html$ http://web.com/$1.php [R=302,NC]
#
DirectoryIndex index.php
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+/)*index\.(s?html?|php)\ HTTP/
RewriteRule ^(([^/]+/)*)index\.(s?html?|php)$ http://www.example.com/$1 [R=301,L] \.s?html? pattern. RewriteRule ^(.*)\.shtml$ http://web.com/$1.php [R=302,NC]
RewriteRule ^(.*)\.html$ http://web.com/$1.php [R=302,NC] RewriteRule ^(([^/]+/)*[^/.]+)\.s?html?$ http://example.com/$1.php [R=301,L] RewriteCond %{HTTP_HOST} !^(www\.example\.com)?$
RewriteRule (.*) http://www.example.com/$1 [R=301,L] So, I am using .htaccess to change the extensions(shtml and html) to new extensions (php) so outside links from external sources need not change.