简单的.htaccess子域重写 [英] Simple .htaccess subdomain rewrite

查看:228
本文介绍了简单的.htaccess子域重写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道有很多关于这个......但现在我觉得自己像被迎面而来的车头灯愣了鹿的问题就在这里......我只是不知道从哪里开始以及选择哪个选项。

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 option to choose.

我的要求很简单。

用户进入 http://application.domain.com 或的 http://www.application.domain.com 并且这些文件的真实位置的 http://www.domain.com/application

User goes to http://application.domain.com or http://www.application.domain.com and the real location of these files is http://www.domain.com/application

显然,这需要使用通配符,这样任何域(即使它不存在)触发重写来完成。

我希望这是有道理的人

编辑: 我还要提到我已经添加了通配符的记录在我的交友DNS条目* .domain.com

I should also mention I have added the wildcard A record to my DNS entries in Cpanel *.domain.com

感谢

推荐答案

我贴这个问题到serverfault.com和icyrock解决它。柜面其他人是否知道给出的答案就在这里:

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

<一个href="http://serverfault.com/questions/203780/troubleshooting-a-htaccess-wildcard-subdomain-rewrite/203804#203804">http://serverfault.com/questions/203780/troubleshooting-a-htaccess-wildcard-subdomain-rewrite/203804#203804

这篇关于简单的.htaccess子域重写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆