如果查询字符串未完整给出,则重定向到 URL
如果查询字符串不完全可用,我想为 Apache 构建重写规则条件。以下是场景:
这是工作 URL 格式 -
https://<base_url>/redirect_uri#state=<value>&token=<value>
如果 URL 类似于 https://
,我想重定向到登录页面。
我尝试如下,但无法识别参数
RewriteCond %{QUERY_STRING} !^#state [NC]
RewriteRule ^/redirect_uri$ https://<base_url>/login [R=301,L]
请帮助我纠正条件以识别参数
I wanted to frame Rewrite rule condition for Apache if the query string is not completely available. Below is the scenario:
This is the working URL format -
https://<base_url>/redirect_uri#state=<value>&token=<value>
If the URL is coming like https://<base_url>/redirect_uri
, I wanted to redirect to the login page.
I tried as below which is not recognizing the parameter
RewriteCond %{QUERY_STRING} !^#state [NC]
RewriteRule ^/redirect_uri$ https://<base_url>/login [R=301,L]
Please help me to correct the condition to recognize the parameter
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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