htaccess 重定向
我试图将子目录及其下面的所有内容重定向到另一个网址。例如,
http://example.com/example/ 应该转到 http://cname.example.com/example/。我不知道如何在 apache 中执行此操作。我知道如何从子目录重写到根目录,但除此之外一无所知。有人知道该怎么做吗?
im trying to redirect a subdirectory and everything beneath it to another url. for example,
http://example.com/example/ should go to http://cname.example.com/example/. Im not sure how to do this in apache. I know how to rewrite from a subdirectory to the root but nothing else. Anyone know how to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
重定向 301 /example/ http://cname.example.com/example/
[编辑:添加链接]
http://www.webweaver.nu/html-tips/web-redirection.shtml
Redirect 301 /example/ http://cname.example.com/example/
[EDIT: Add Link]
http://www.webweaver.nu/html-tips/web-redirection.shtml