首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >基于referrer使用htaccess进行重定向

基于referrer使用htaccess进行重定向
EN

Stack Overflow用户
提问于 2010-07-12 17:19:05
回答 1查看 449关注 0票数 0

我想要重定向所有的请求从一个推荐人文件夹。这是一个场景。

我想要从http://www.example.com/demo/ex1/*.*到http://www.example.com/ex1/*.*的所有推荐人请求

请帮帮我。

谢谢

EN

回答 1

Stack Overflow用户

发布于 2010-07-12 17:27:15

你有太多的子页面,你不能这样做:

代码语言:javascript
复制
# Redirect old file path to new file path
Redirect /olddirectory/oldfile.html http://mt-example.com/newdirectory/newfile.html

或者是因为某些特定的原因?

如果是这样的话,你可以尝试一下,然后得到你的答案。)

代码语言:javascript
复制
# To redirect all users to access the site WITHOUT the www. prefix,
# (http://www.example.com/... will be redirected to http://example.com/...)
# adapt and uncomment the following:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.mt-example\.com$ [NC]
RewriteRule ^(.*)$ http://mt-example.com/$1 [L,R=301]

如果你想知道这是关于.htaccess的

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/3227159

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档