简体   繁体   English

在 Apache 中隐藏子域

[英]Hide sub-domain in Apache

I've been working with Apache for a few months but I've run into a problem I can't seem to solve.我已经使用 Apache 几个月了,但我遇到了一个我似乎无法解决的问题。 I'd like to hide my sub-domain (primarily for my mobile site).我想隐藏我的子域(主要用于我的移动网站)。 For example I've already written an .htaccess file that redirects mobile devices to m.example.com but now I'd like to hide the "m."例如,我已经编写了一个 .htaccess 文件,该文件将移动设备重定向到 m.example.com 但现在我想隐藏“m”。 on only mobile devices is this possible?仅在移动设备上这可能吗?

Please help!请帮忙!

Thanks谢谢

Andy安迪

For this case, you must place all content on the same vhost.对于这种情况,您必须将所有内容放在同一个虚拟主机上。 Then you could use *mod_rewrite* to change the internal path for the content without showing it to the user.然后您可以使用 *mod_rewrite* 更改内容的内部路径,而不向用户显示。

This is not possible with two different vhosts.这对于两个不同的虚拟主机是不可能的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM