dongsu0308 2014-02-13 16:46
浏览 104
已采纳

htaccess重写 - 不重写index.php 2

RewriteRule ^Interface/Base/Login.aspx?ReturnUrl=%2findex.html.var$ Interface/Base/Login.aspx [R,NC,L] 

is not working. I want it to redirect to Login.aspx so it can work this is mapping another site by doing

RewriteRule (.*) http://xx.xx.xx.xx:8880/$1 [P,L]

Rewrite file is as follows:

RewriteEngine On
RewriteBase /
RewriteRule ^Interface/Base/Login.aspx?ReturnUrl=%2findex.html.var$ Interface/Base/Login.aspx [R,NC,L]
RewriteRule (.*) http://xx.xx.xx.xx:8880/$1 [P,L]

IP is hidden for protection.

  • 写回答

1条回答 默认 最新

  • douguanyan9928 2014-02-13 16:52
    关注

    You can't match query string in RewriteRule use RewriteCond %{QUERY_STRING} like this:

    RewriteCond %{QUERY_STRING} ^ReturnUrl=.*?index\.html\.var$ [NC]
    RewriteRule ^Interface/Base/Login\.aspx$ /Interface/Base/Login.aspx? [R,NC,L] 
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 Odoo17操作下面代码的模块时出现没有'读取'来访问
  • ¥50 .net core 并发调用接口问题
  • ¥15 网上各种方法试过了,pip还是无法使用
  • ¥15 用verilog实现tanh函数和softplus函数
  • ¥15 Hadoop集群部署启动Hadoop时碰到问题
  • ¥15 求京东批量付款能替代天诚
  • ¥15 slaris 系统断电后,重新开机后一直自动重启
  • ¥15 QTableWidget重绘程序崩溃
  • ¥15 谁能帮我看看这拒稿理由啥意思啊阿啊
  • ¥15 关于vue2中methods使用call修改this指向的问题