I would like a .htaccess file which rewrites .php files as .htm files, however, if the .php file doesn't exist - try simply opening the .htm file with the same name.
It also needs to do a 301 redirect for anyone visiting any page on a certain domain (using same webspace). If that makes sense...
This is what I have so far:
RewriteEngine on
RewriteBase /
RewriteRule ^(.*)\.htm$ $1.php [L]
Which changes .php to .htm
And I've been trying to use:
RewriteCond %{SERVER_NAME} ^*example.co.uk*
RewriteRule ^/$ [url]http://www.anotherexample.co.uk/[/url] [L]
But it doesn't really work..
Any help would really be appreciated.
Regards,
Martin