Forum Moderators: phranque
Each subdomain has about 500 inbound links. I intend to redirect three subdomains to the main domain. All sites are of the same topic, and I will use the same file structure as I do on the sub domains.
I would really appreciate any tips and ways to avoid being sand boxed.
Cheers
DB
Apache and it seems that I can only get RedirectMatch 301 to work. I
If I want to redirect one domain to another domain I get a error 500 if I use either:
Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L]
or
Redirect 301 / http://www.newdomain.com/
[edited by: jdMorgan at 2:56 pm (utc) on Nov. 20, 2007]
[edit reason] de-linked [/edit]
Thanks for the reply.
I have not yet set up the 301 redirect for the sub-domains in question.
However, I have tested the following .htaccess code which seems to work on my server:
RedirectMatch 301 / [mysite.com...]
Here is the Header report:
#1 Server Response: [mysite.com...]
HTTP Status Code: HTTP/1.1 301 Moved Permanently
Date: Tue, 20 Nov 2007 18:09:29 GMT
Server: Apache/2.2.3 (Debian) mod_python/3.2.10 Python/2.4.4 PHP/4.4.4-8+etch4
Location: [mynewsite.com...]
Content-Length: 374
Connection: close
Content-Type: text/html; charset=iso-8859-1
Redirect Target: [mynewsite.com...]
#2 Server Response: [mynewsite.com...]
HTTP Status Code: HTTP/1.1 200 OK
Content-Length: 13641
Content-Type: text/html; charset=UTF-8
Last-Modified: Fri, 16 Nov 2007 16:11:18 GMT
Should i use the same approach for the re-direct for the sub domains? Any other advice would be most appreciated.
Thanks in advance
DB
Not sure what you mean by: "Do they serve the exact same pages?"
Please note that the example I give of "mysite" and "mynewsite" is not referring to redirecting england.mysite.com to mysite.com/england/. This is an example of how the server is currently set up for another 301 domain re-direct.
Options +FollowSymLinks
RewriteEngine on
#
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www\.mynewsite\.com
RewriteRule (.*) http://www.mynewsite.com/$1 [R=301,L]
Jim
[edited by: jdMorgan at 8:43 pm (utc) on Nov. 20, 2007]
Most probably 301 each sub-domain with either of the two options:
(Example A)
location.domain to domain/location
However, I would prefer to do the following:
(Example B)
location.domain to domain/location
and a few pages like this:
location.domain/product/ to domain/product/
Any idea if Example B is a bad idea? If from a technical POV example B is not too difficult to achieve then I would rather go with this.
Please advise on the .htaccess code.
Thanks a million.