pmagony
asked on
301 Redirect Domain to Sub-domain?
Howdy,
LINUX SERVER
Is it possible to 301 redirect a domain to a sub-domain within the main domain?
redirect 301 / http://www.subdomain.com/
OR
www.domain.com to www.subdomain.com
we have a fully qualified domain name that is an ADD ON domain under our hosting plan. Done so that individual hosting for each domain is negated. However, we'd like to take the main domain and redirect it permanently to the sub-domain.
Thanks-
LINUX SERVER
Is it possible to 301 redirect a domain to a sub-domain within the main domain?
redirect 301 / http://www.subdomain.com/
OR
www.domain.com to www.subdomain.com
we have a fully qualified domain name that is an ADD ON domain under our hosting plan. Done so that individual hosting for each domain is negated. However, we'd like to take the main domain and redirect it permanently to the sub-domain.
Thanks-
ASKER
Hi,
In my .htaccess file I entered this and uploaded it to root:
redirect 301 / http://www.subdomain.com/
Produces an error: page cannot be displayed.
In my .htaccess file I entered this and uploaded it to root:
redirect 301 / http://www.subdomain.com/
Produces an error: page cannot be displayed.
Maybe You not allowed to override FileInfo
Can You verify that in apache's error log?
Also, do subdomain is the same virtualHost (documentRoot) as basedomain?
Can You verify that in apache's error log?
Also, do subdomain is the same virtualHost (documentRoot) as basedomain?
ASKER
"Also, do subdomain is the same virtualHost (documentRoot) as basedomain?"
Yes... it's a folder in the root. It's also been setup as a subdomain.domain.com.
Browser Error:
The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
Server Error Log:
67.35.122.80 - - [30/Jan/2008:13:28:14 -0800] "GET / HTTP/1.1" 304 - "http://www.domain.com/" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11"
Yes... it's a folder in the root. It's also been setup as a subdomain.domain.com.
Browser Error:
The page isn't redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
Server Error Log:
67.35.122.80 - - [30/Jan/2008:13:28:14 -0800] "GET / HTTP/1.1" 304 - "http://www.domain.com/" "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Redirect permanent / http://www.subdomain.com/
put it within <VirtualHost >, <Directory > or /document/root/.htaccess