In webhost4life, anyone know how I can redirect the user when the they hit the root domain, i.e. gogo.com redirect to www.gogo.com
Thanks
-Mantisimo
I've found a configuration file in the root called httpd.ini
This contains the followig
[ISAPI_Rewrite]
### subdomain redirect v2 ###
RewriteCond Host: ?gogo\.com
RewriteCond URL ^gogo.com/(.*)
RewriteCond METHOD GET
RewriteRule .? www.gogo.com/(.*) /$1 [I,R]
RewriteCond Host: (?:.+\.)?gogo\.com
RewriteCond METHOD POST
RewriteRule ^/gogo.com/(.*) /$1 [I]
RewriteCond Host: (?:.+\.)?gogo\.com
RewriteRule (.*) /gogo.com/$1 [I,L]
Can someone explain how I can change this? I've found some code on mod_r开发者_如何学Goewrite but this is iis. I dont have a great understadning of regular exressions so this is a bit of a black art to me
Can any help?
Thanks
technically you're not talking about the domain but rather the webserver's response to a request. it can be done any number of ways, but check out Apache's mod_rewrite.
See the section "Canonical Hostnames" at http://httpd.apache.org/docs/2.0/misc/rewriteguide.html
I figured it out! :)
# Move anything from non- www.example.com -> www.example.com
# e.g. example.com -> www.example.com
RewriteCond %HTTPS off
RewriteCond Host: (?!^www.example.com)(.+)
RewriteRule /(.*) http\://www.example.com/$2 [I,RP]
I just added this above replacing the domain :)
http://www.seoconsultants.com/windows/isapi/rules/
If you are using the old WebHost4Life interface, simply click on "Set Redirection" and point gogo.com to www.gogo.com
精彩评论