[英]301 Redirect for folder page in ISAPI Rewrite
將文件夾中的ISAPI Rewrite中的URL重定向到主頁的正確語法是什么? 例如... /category/sub-category/file.html
我已經嘗試了很多事情,例如...
RewriteRule ^category/sub-category/file.html / [NC,R=301,L]
RewriteRule ^category/sub-category/file.html http://www.mysite.com/ [NC,R=301,L]
RewriteRule ^category/sub-category/file.html http\://www.mysite\.com/ [NC,R=301,L]
RewriteRule ^category/sub-category/file\.html / [NC,R=301,L]
RewriteRule ^category/sub-category\/file\.html / [NC,R=301,L]
etc.
...但是我似乎什么也無法工作!
確保您具有以下條件:
RewriteEngine on
RewriteBase /
RewriteRule ^category/sub-category/file\.html$ http://www.domain.com/ [NC,R=301,L]
如果上述方法不起作用,請嘗試遵循Helicon的FAQ( http://www.helicontech.com/forum/10648-FAQ.html ),並確保ISAPI_Rewrite可以正常工作。 這是ISAPI_Rewrite3,對嗎?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.