帮助htaccess isapi重写
RewriteRule ^olddomain.php?cat=39$ http://www.newdomain.com/firstdir/seconddir/? [R=301,NC]
RewriteRule ^olddomain.php\?cat\=39$ http://www.newdomain.com/firstdir/seconddir/? [R=301,NC]
RewriteRule ^olddomain.php?cat\=39$ http://www.newdomain.com/firstdir/seconddir/? [R=301,NC]
RewriteRule ^olddomain.php\?cat=39$ http://www.newdomain.com/firstdir/seconddir/? [R=301,NC]
他们为什么工作???我认为这个问题与第一个问号、第一个等号或数字“39”有关...哈哈
RewriteRule ^olddomain.php?cat=39$ http://www.newdomain.com/firstdir/seconddir/? [R=301,NC]
RewriteRule ^olddomain.php\?cat\=39$ http://www.newdomain.com/firstdir/seconddir/? [R=301,NC]
RewriteRule ^olddomain.php?cat\=39$ http://www.newdomain.com/firstdir/seconddir/? [R=301,NC]
RewriteRule ^olddomain.php\?cat=39$ http://www.newdomain.com/firstdir/seconddir/? [R=301,NC]
why they work??? the issue i think has something to do with the first question mark, the first equal sign, or the digits '39'...haha
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请记住,RewriteRule 仅匹配您的 URI,它永远不会匹配主机名或查询字符串。这是做你想做的事情的正确方法:
Remember RewriteRule matches only your URI and it will never match the host name or query string. Here is the right way to do what you are trying to do: