[英].htaccess rewriterule 500 internal error
這可能已經存在,但我現在似乎找不到答案了。
這就是我想要的:
http://example.com/user/blitzen12
http://example.com/properties/1
.htaccess文件
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]
問題是,當我嘗試訪問http://example.com/properties/1
而第一個重寫符存在時,我得到500個內部錯誤。 但是當我試圖刪除或評論第一個重寫時,一切正常。
或當我嘗試訪問http://example.com/agents/blitzen12
而第二次重寫時,我得到了同樣的錯誤,當我刪除第二次重寫時它工作正常
apache完整的錯誤日志
[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.
誰能指出我做錯了什么? 謝謝
從你的兩個RewriteRules中刪除./
應該可以解決問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.