Hi,
I recently changed the name of my company. Now, the site works great with both domains (www.domain1.com and www.domain2.com).
I want to make it so any time someone goes to the www.OLDdomain.com/path/file it will redirect to www.NEWdomain.com/path/file.
The issue I am running in to is if I do a redirect at the server level with my .htaccess, it will only redirect to the root of the domain, eg:
www.olddomain.com/path/file redirects to www.newdomain.com
I need it to redirect to the same path.
Is there a module that will do this? I do not want two URLS pointing to one file.

Comments

souldessin’s picture

Who do you have for hosting? Can you edit the Apache file or DNS entries, or are you using Cpanel? I will be glade to help when I know more.

vm’s picture

can't this be done these days?

that aside this might explain what you are after under the heading of 301 Redirects – When Your Path & Files Change Too - although after reading it again, it may not deal with wildcards

not sure any modules will aid here but there is the redirect.module and the globalredirect.module which may be worth looking at.

SeamusJp’s picture

My redirect in the htaccess was in the wrong spot! Oops! Thanks for this!