.htaccess rewriteCond 忽略您自己的域
如果我在 .htaccess
中有这样的规则:
RewriteCond %{QUERY_STRING} ^URL\=(.+?)(-[0-9]+)?$
RewriteRule ^(.*)$ /index.php? [R=404,L]
我该如何更改它,以便忽略来自网站自己的域的 ?URL=
之后的任何内容?
例如,my-domain.com?URL=http://porn.site
会被重定向,但 my-domain.com?URL=https://my-domain.com/ some-page
被忽略。
If I have a rule in .htaccess
like this:
RewriteCond %{QUERY_STRING} ^URL\=(.+?)(-[0-9]+)?$
RewriteRule ^(.*)$ /index.php? [R=404,L]
how would I change it so that ignores anything after ?URL=
from the site's own domain?
For example, my-domain.com?URL=http://porn.site
gets redirected, but my-domain.com?URL=https://my-domain.com/some-page
is ignored.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以使用:
You can use: