.htaccess Not Redirecting Properly

This one seems simple enough.

I have migrated a site from

http://old.temp.url.com

to

http://newurl.com

To capture any indexed pages, I added the below to my .htaccess file:

RewriteBase /
RewriteCond %{HTTP_HOST} !newurl.com$ [NC]
RewriteRule ^(.*)$ http://www.newurl.com/$1 [L,R=301]

Not rocket science, right?

Well, it does not work exactly right.

http://old.temp.url.com #redirects to http://newurl.com YAY!
http://old.temp.url.com/page #stays on http://old.temp.url.com/page HUH??

For some reason the RegEx is not capturing anything beyond the base URL. Am I missing something?

Do you have other htaccess files in subfolders?

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.