Mod rewrite ISAPI重写中文件夹页的301重定向
在ISAPI重写中,将文件夹中的URL重定向到主页的正确语法是什么?例如/类别/子类别/file.html 我试过很多东西,比如Mod rewrite ISAPI重写中文件夹页的301重定向,mod-rewrite,redirect,isapi-rewrite,isapi-redirect,Mod Rewrite,Redirect,Isapi Rewrite,Isapi Redirect,在ISAPI重写中,将文件夹中的URL重定向到主页的正确语法是什么?例如/类别/子类别/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.ht
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(),并确保ISAPI_重写完全起作用。这是伊萨皮尤3号,对吗