0

I will present a to the point example.

I have a domain name as: www.abc.com

And another domain name as: www.123.com

Now i want to write a rewritemodule in .htaccess for the following case:

If i request a url like: www.123.com/xyz

It will redirect my request to www.abc.com/track/index.php?ext=xyz

Also please tell me on which directory i should keep that .htaccess file.

Thanks.

Ali Gajani
  • 14,762
  • 12
  • 59
  • 100

1 Answers1

0

In the root folder of www.123.com, you would create an htaccess file with the following line:

RedirectMatch 301 (.*) www.abc.com/track/index.php?ext=$1

Since you are doing an external redirect, it is not necessary to use mod_rewrite.

Wige
  • 3,788
  • 8
  • 37
  • 58
  • Internal Server Error. Let me explain you the structure. www.abc.com is pointing at: home/abc/public_html/ www.123.com is pointing at: home/abc/track/ I want www.123.com/xyz to point at www.abc.com/track/index.php?ext=xyx [home/abc/public_html/track/index.php] www.123.com is an addon domain of www.abc.com – Haseeb Khilji Dec 05 '12 at 20:25