Welcome Guest, Not a member yet? Register   Sign In
Sub Domain Re-route
#3

[eluser]brianw1975[/eluser]
i believe you need to make sure of a couple things, more research will be required of course.

a) be sure your dns sends all mysite.com and www.mysite.com to the same ip address (typical setup).
b) be sure that your webserver is set to handle those (typically most are) (ServerName mysite.com Alias www.mysite.com)
c) use a mod_rewrite rule to rewrite the subdomain

Ex -- needs to be modified:
Code:
RewriteCond %{HTTP_HOST} !^w{3}\. [NC]
RewriteCond %{REQUEST_URI} !^/userdir/ [NC]
RewriteCond %{HTTP_HOST} ^([^.]+)\.domain\.com$ [NC]
RewriteRule ^.*$ /userdir/index.php?user=%1 [L]


Messages In This Thread
Sub Domain Re-route - by El Forum - 02-02-2010, 03:56 AM
Sub Domain Re-route - by El Forum - 02-02-2010, 06:44 AM
Sub Domain Re-route - by El Forum - 02-02-2010, 08:44 AM



Theme © iAndrew 2016 - Forum software by © MyBB