Dynamic Redirect Help


I have a wiki web site currently on a domain in a directory. Now I want to move it to his own domain.

Problem: there’s already a lot of web site that link to my wiki, and I wouldn’t want to loose their visits.

It’s currently under: www.maindomain.com/wiki
I want it under www.newdomain.com

How can I make something that will automatically redirect to the new domain, on the good page.

ex: www.maindomain.com/wiki/index.php?title=Main_Page will redirect on www.newdomain.comindex.php?title=Main_Page

I know some website do this, but I really don’t know how. It must be .htaccess, but I don’t know much about that.

if someone can help, I would appreciate.

Create an .htaccess file in the root directory of the original site with the following line:

Redirect /wiki http://www.newdomain.com That’s it!

If you want useful replies, ask smart questions.

and it will carry the extra address ?

I mean the “index.php?title=Main_Page” will be sent to the new domain name and the user will see the good web page?

If so, it’s easier that I was thinking :smiley: