htaccess 从domain.com重定向到sub.domain.com,同时保持对文件夹的文件访问
我想从 http://domain.com & 重定向网站http:// www.domain.com 到 http://v2.domain.com,同时保持对 http 的访问:// (www.)domain.com/images/*
我尝试了多种方法,但不知何故我无法再访问 /images 文件夹。
PS:子域和子域根目录有不同的内容/CMS。关于如何实现这一点有什么想法吗?
谢谢
I'd like to redirect a website from http:// domain.com & http:// www.domain.com to http://v2.domain.com, while maintaining access to http:// (www.)domain.com/images/*
I've tried several methods but somehow I can no longer access the /images folder anymore.
P.S: both subdomain & root has different content/CMS. Any ideas as to how to implement this?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您还没有准确解释它们是如何配置的。我假设 www.domain.com 和 v2.domain.com 是不同的虚拟主机:
您应该能够在 www.domain 的
.htaccess
文件或 apache 配置中执行此操作。 com:You haven't explained exactly how these are configured. I'm going to assume that www.domain.com and v2.domain.com are different virtual hosts:
You should be able to do this in your
.htaccess
file or apache configuration for www.domain.com:我意识到这样的事情也可以起作用。可能需要一些测试,但如果这是错误的,请发表评论。
I realised something like this could work as well. Probably need some testing, but if this is wrong do comment.