Forum Moderators: phranque
RewriteEngine on
RewriteRule /site_A_homefolder/ http**://site_B.com/
It works in my computer hosting site A. When I visit
http**://site_A.com at this computer, it will be redirect to http**://site_B.com/
However, when I visit Site A from any other computer, I got no response.
Can anyone help?
Welcome to WebmasterWorld!
We're going to need a lot more information in order to suggest anything.
Are your sites hosted on separate servers?
What appears in your server error log when 'it doesn't work'?
Have you tried using the simpler RedirectPermanent directive of mod_alias [httpd.apache.org], rather than mod_rewrite?
The more information you post, the more likely someone will spot something that might need to be changed.
Jim
1) In the case of the following setting:
RewriteEngine on
RewriteRule ^/site_A_homefolder/(.+) http**://site_B.com/$1 [R]
When I visit http**://site_A.com/ from A computer, I get some info from access.log
site_A_ip - - [19/Sep/2005:13:27:01 -0400] "GET /site_A_homefolder/ HTTP/1.1" 301 316
I was redirected to http**://site_B.com/
If I I visit http**://site_A.com/ from B (or any other but A) computer,
I get no response and there is no info added to error.log or access.log file.
2) I also tried
Redirect permanent /site_A_homefolder/ http**://site_B.com/
I get the same info from both log files at Site_A.