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

[eluser]jhayghost[/eluser]
Good Day,

Is it possible to re-route may sub domain? ex. my site URL is subsite.test.com and I need to re-route to test.com/subsite/index.

Thanks
#2

[eluser]seanloving[/eluser]
try using routes or a redirect?
#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]




Theme © iAndrew 2016 - Forum software by © MyBB