Hi,

These rewrite rules work really well. I am wondering if the fact that I don't enforce the www first that I am causing needless overhead as it needs to switch from domain 1 to domain 2 before enforcing the www?

here it is:
Code:
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d


# Redirect old_domain.com to new_domain.com with 301 and...
RewriteCond %{HTTP_HOST} ^old_domain.com$ [NC]
RewriteRule ^([a-zA-Z0-9]+)$ http://new_domain.com/$1 [R=301,L]


# Ensure www  with 301
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]


# remove .php ONLY if requested directly
RewriteCond %{THE_REQUEST} (\.php\sHTTP/1)
RewriteRule ^([a-zA-Z]+)\.php$ /$1 [R=301,L,QSA]


# Redirect extensionless version to .php version
RewriteRule ^([a-z]+)$ $1.php
Do you have any suggested improvements?

Regards,
Steve