douwen5066 2013-06-20 13:53
浏览 11

mod_rewrite行为奇怪 - 一些RewriteRules工作,而其他人没有

I have a list of about 40 RewriteRules, all pointing to the same page, but with a different query string.

Most (37) of the rewrites work properly. Here are examples:

RewriteRule ^absa/?$ /register.php?company=absa [NC,L]
RewriteRule ^crc/?$  /register.php?company=crc [NC,L]

But 3 of them don't work at all and throw a server error. They aren't any different, as far as I can tell.

RewriteRule ^bv/?$  /register.php?company=bv [NC,L]

I've tried restarting Apache, I've visited register.php?company=bv and it works just fine, and I'm all out of ideas.

Anyone know what might be going on?

Thanks.

  • 写回答

1条回答 默认 最新

  • dongman2721 2013-06-20 19:00
    关注

    Not an answer (since you haven't provided all the details like error.log) but you can reduce your total # of rules dramatically like this:

    RewriteRule ^(crc|absa|bv|ge|qafco)/?$  /register.php?company=$1 [NC,L]
    
    评论

报告相同问题?

悬赏问题

  • ¥15 如何在炒股软件中,爬到我想看的日k线
  • ¥15 51单片机中C语言怎么做到下面类似的功能的函数(相关搜索:c语言)
  • ¥15 seatunnel 怎么配置Elasticsearch
  • ¥15 PSCAD安装问题 ERROR: Visual Studio 2013, 2015, 2017 or 2019 is not found in the system.
  • ¥15 (标签-MATLAB|关键词-多址)
  • ¥15 关于#MATLAB#的问题,如何解决?(相关搜索:信噪比,系统容量)
  • ¥500 52810做蓝牙接受端
  • ¥15 基于PLC的三轴机械手程序
  • ¥15 多址通信方式的抗噪声性能和系统容量对比
  • ¥15 winform的chart曲线生成时有凸起