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

查看:16
本文介绍了简单的 .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.comhttp://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

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

我希望这对某人有意义

我还应该提到我在 Cpanel *.domain.com 中的 DNS 条目中添加了通配符 A 记录

谢谢

蒂姆

推荐答案

我将此问题发布到 serverfault.com 上,icyrock 解决了它.如果其他人想知道给出的答案在这里:

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

蒂姆

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

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