• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
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]


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.