1
일부 URL을 리디렉션하기 위해 비교적 간단한 .htaccess 규칙을 수행하려고합니다. 규칙이 일치하지 않습니다. 여기에 내가 무엇을 가지고 :Apache mod_rewrite .htaccess 규칙이 일치하지 않습니다. - 이스케이프 처리 된 문자
RewriteEngine On
RewriteBase/
# This works fine
RewriteCond %{QUERY_STRING} ^id=2$ [NC]
RewriteRule ^products\.php$ /? [R=301,NE,NC,L]
# This doesn't match at all
RewriteRule ^products/-Smart-Smoker-\'Storm\'-White-Manual-Electronic-Cigarette-\(510\)\.html http://www.smartsmoker.co.uk/products/-Smart-Smoker-Storm-White-Manual-Electronic-Cigarette-%28510%29.html [NC,R=301]
# Neither does this
RewriteRule ^products/Christmas-Cracker-%252d-FREE-Shipping\.html$ http://www.smartsmoker.co.uk/categories/Electronic-Cigarette-Kits/Breeze-Mini-Electronic-Cigarette/ [L,R=301]