我想重定向来自referrer文件夹的所有请求。这是场景。
我希望所有请求都来自http://www.example.com/demo/ex1/*。*到http://www.example.com/ex1/*。*
请帮助。
由于
答案 0 :(得分:0)
你有很多你不能这样做的子页面:
# Redirect old file path to new file path
Redirect /olddirectory/oldfile.html http://mt-example.com/newdirectory/newfile.html
或是出于某种特定原因?
如果是这样,你可以玩一点并获得你的答案;)
# 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