dongzhi9457 2014-05-22 07:18
浏览 20
已采纳

.htaccess rewriterule 500内部错误

this might already exist but i can't seem to find out the answer after searching for a while now.

well this is what i want:

http://example.com/user/blitzen12
http://example.com/properties/1

.htaccess file

Options FollowSymLinks
RewriteEngine On 
RewriteBase /example.com/

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^user/([^\/]*)\/?$ ./user/user-page.php?name=$1 [L,QSA]
RewriteRule ^properties/([^\/]*)\/?$ ./properties/property-page.php?pid=$1 [L,QSA]

the problem is when I try access http://example.com/properties/1 while the first rewriterule is present I got 500 internal error. but when I try to remove or comment the first rewriterule everything is working fine.

or when I try to access http://example.com/agents/blitzen12 while the 2nd rewriterule is present I got the same error and it's working fine when I remove the 2nd rewriterule

apache full error logs

[Thu May 22 14:59:12.940137 2014] [core:error] [pid 216:tid 1668] [client ::1:58929] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

can someone point out what I did wrong? Thanks

  • 写回答

1条回答 默认 最新

  • duanguochong0397 2014-05-22 07:33
    关注

    Removing ./ from your two RewriteRules should do the trick.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥15 stable diffusion
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条