.htaccess tutorial

htaccess Elite


How to rewrite to new domain without query string

Ask your mod_rewrite and Redirection questions here, and get answers!

How to rewrite to new domain without query string

New postby Berryman » 18 Nov 2009 18:03

Hi

We have recently changed the domain of a site. We have set up the rewrite so that all the old pages redirect to the new home page. However, if someone comes to the site from a search engine, the old query strings are displayed in the address instead of just the new domain name.

Can someone advise on how I should amend the rewrite?

Here is what is happening to an example old page:

www.olddomain.com/foldername/?id=1234

redirects correctly to: www.newdomain.com

but the url in the address bar says: www.newdomain.com/?id=1234

Many thanks

RHB
Berryman
 
Posts: 1
Joined: 18 Nov 2009 17:34

Return to Redirect or Rewrite Questions