Simple .htaccess subdomain rewrite

后端 未结 2 1327
醉酒成梦
醉酒成梦 2021-01-19 17:37

I know there is a lot of questions on here about this... but right now I feel like a deer stunned by oncoming headlights... I just don\'t know where to start and which optio

相关标签:
2条回答
  • 2021-01-19 17:53

    I posted this question onto serverfault.com and icyrock solved it. Incase anyone else is wondering the answer given is here:

    https://serverfault.com/questions/203780/troubleshooting-a-htaccess-wildcard-subdomain-rewrite/203804#203804

    Tim

    0 讨论(0)
  • 2021-01-19 18:05

    Simplest way in .htaccess would be to put the following in an htaccess file as high up in the hierarchy as possible.

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^www\.application\.* [OR]
    RewriteCond %{HTTP_HOST} ^application\.* [NC]
    RewriteRule .* http://www.domain.com/application [L]
    
    0 讨论(0)
提交回复
热议问题