Google Answers Logo
View Question
 
Q: Mod_rewrite ( No Answer,   2 Comments )
Question  
Subject: Mod_rewrite
Category: Computers > Programming
Asked by: infinity1993-ga
List Price: $20.00
Posted: 13 May 2004 13:12 PDT
Expires: 14 May 2004 04:38 PDT
Question ID: 345943
Please provide the exact code needed to rewrite the pages from one
domain to another.  Currently we are hosting one web site and have
another domain name mirrored to the hosted one.  We believe this is
affecting our ranking in Google.  We have an unix-based server and the
mod_rewrite is enabled.

Example would be:

http://firstdomain.com/first_category/index.html

---> Redirects to:

http://otherdomain.com/first_category/index.html

The files, file structure, etc. are exactly the same.  In essence we
are just rewriting one domain to another.
Answer  
There is no answer at this time.

Comments  
Subject: Re: Mod_rewrite
From: peyyetir-ga on 13 May 2004 22:38 PDT
 
Assuming that you are running Apache webserver with mod_rewrite
module; try adding these lines in your firstdomain.com virtualhost
configuration:

 RewriteEngine On
 RewriteRule ^/first_category/index.html
http://otherdomain.com/first_category/index.html [R]

Note: Make sure your rewrite rule is in single line with no line break.
Subject: Re: Mod_rewrite
From: infinity1993-ga on 14 May 2004 04:37 PDT
 
Thanks. This works just fine!

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy