重定向对我不起作用
我的 IsapiRewrite.ini 文件中有以下行:
RewriteRule ^/test-url.asp$ http://www.google.co.uk/ [R=301,L]
但它没有执行任何操作...
但是,这确实有效:
RewriteRule ^/test-url.asp$ /
这是启用重定向或类似内容的情况吗?我本以为如果 IsapiRewrite4.dll 正在运行,重定向就会起作用吗?
请问有人可以建议吗?
I have the following line in my IsapiRewrite.ini file:
RewriteRule ^/test-url.asp$ http://www.google.co.uk/ [R=301,L]
But it doesn't do anything...
However, this DOES work:
RewriteRule ^/test-url.asp$ /
Is it a case of enabling Redirect or something like that? I would have thought that if the IsapiRewrite4.dll is running, the redirect would work?
Please can someone advise?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
试试这个(稍微修改为不区分大小写):
Try this (slightly modified to be case insensitive):
原来是 Isapi Readme 上的文档...
要做重定向,它不是“RewriteRule”,而是“RedirectRule”...只是偶然尝试了一下。结束了工作。但是,上述建议在 .htaccess Linux 服务器上确实有效。
谢谢你们。
Turns out to be the documentation on the Isapi Readme...
To do redirect, its not "RewriteRule", but instead "RedirectRule"... just tried it by chance. Ended up working. However, the above suggestions do work on .htaccess Linux servers.
Thanks guys.