这是我的问题
我在网站A上有10个网址
任何人都可以帮忙吗?
Redirect /percussion/21021-crossing-grip-extensions http://myblog.tumblr.com/thisURL
Redirect /percussion/21045-indoor-percussion-circuits http://myblog.tumblr.com/thisURL
Redirect /percussion/21047-26-standard-rudiments-on-social-media http://myblog.tumblr.com/thisURL
RewriteCond %{REQUEST_URI} !^/wind-instruments/38250-hd200-excerpt-video
RewriteCond %{REQUEST_URI} !^/namm-2015-products/49480-gc1ta
RewriteCond %{REQUEST_URI} !^/namm-2015-products/49485-u1ta-2015
RewriteCond %{REQUEST_URI} !^/namm-2015-products/49486-a6r-a-series-2015
RewriteRule ^(.+)$ http://www.codephun.com/$1 [R=301]
答案 0 :(得分:0)
你有一个巨大的.htaccess文件。我将提供一些可用于解决问题的提示。
Redirect
指令,只需使用RewriteRule
本身的规则。THE_REQUEST
变量代替REQUEST_URI
作为THE_REQUEST
变量,该变量代表Apache从您的浏览器收到的原始请求,并且在执行某些重写规则后不会被覆盖。因此,对于上面显示的代码段,请使用:
RewriteEngine On
RewriteRule ^percussion/21021-crossing-grip-extensions http://myblog.tumblr.com/thisURL [L,NC,R=302]
RewriteRule ^percussion/21045-indoor-percussion-circuits http://myblog.tumblr.com/thisURL [L,NC,R=302]
RewriteRule ^percussion/21047-26-standard-rudiments-on-social-media http://myblog.tumblr.com/thisURL [L,NC,R=302]
RewriteCond %{THE_REQUEST} !/wind-instruments/38250-hd200-excerpt-video
RewriteCond %{THE_REQUEST} !/namm-2015-products/49480-gc1ta
RewriteCond %{THE_REQUEST} !/namm-2015-products/49485-u1ta-2015
RewriteCond %{THE_REQUEST} !/namm-2015-products/49486-a6r-a-series-2015
RewriteRule ^(.+)$ http://www.codephun.com/$1 [R=301]
# Rest of the Joomla rules come here