I开发者_如何学编程 want to redirect all the requests from a referrer folder. Here is the scenario.
I want all the requests with referrer from http://www.example.com/demo/ex1/*.* to http://www.example.com/ex1/*.*
Help Please.
Thanks
You have that many subpages that you can't do this:
# Redirect old file path to new file path
Redirect /olddirectory/oldfile.html http://mt-example.com/newdirectory/newfile.html
or is for some specific reason?
if so, you can play a little with this and obtain your answer ;)
# 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]
Just in case you are asking this is for the .htaccess
精彩评论