mod_rewrite 帮助
我遇到了 mod_rewrite 问题。完整的解释以及日志如下:
############################################################
Options +FollowSymLinks -MultiViews -Indexes
RewriteEngine on
RewriteBase /managedDir
RewriteRule login/client/$ /managedDir/index.php?user= [L]
RewriteRule login/(.*)/admin-lostpassword/$ /managedDir/admin/content/admin-lostpassword.php [L]
RewriteRule login/(.*)/$ /managedDir/index.php?user=$1 [L]
RewriteRule user.(.*)/page/(.*)/$ /managedDir/index.php?user=$1&page=$2
############################################################
我目前在登录时遇到很多问题 http://localhost/managementDir/login/client/ 但我可以登录: http://localhost/managementDir/login/admin/
这是 error.log:
[Sat May 28 16:57:13 2011] [error] [client 127.0.0.1] PHP Notice: Undefined index: user in C:\\xampp\\htdocs\\MDFramework\\index.php on line 133, referer: /managedDir/login/client/
[Sat May 28 16:57:13 2011] [error] [client 127.0.0.1] PHP Stack trace:, referer: /managedDir/login/client/
[Sat May 28 16:57:13 2011] [error] [client 127.0.0.1] PHP 1. {main}() C:\\xampp\\htdocs\\MDFramework\\index.php:0, referer: /managedDir/login/client/
[Sat May 28 16:57:14 2011] [error] an unknown filter was not added: DEFLATE
这是access.log:
127.0.0.1 - admin [28/May/2011:16:57:13 -0500] "POST /managedDir/ HTTP/1.1" 302 26661 "/managedDir/login/client/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1"
127.0.0.1 - admin [28/May/2011:16:57:14 -0500] "GET /managedDir/user.client/page/home/ HTTP/1.1" 200 4 "/managedDir/login/client/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1"
当我登录到 /login/admin/ 时,它会正确加载页面并登录。但是当我登录到 /login/client/ 时,它会给我一个空白页面。
我该如何解决这个问题?
I'm having mod_rewrite problems. A full explanation, plus logs is below:
############################################################
Options +FollowSymLinks -MultiViews -Indexes
RewriteEngine on
RewriteBase /managedDir
RewriteRule login/client/$ /managedDir/index.php?user= [L]
RewriteRule login/(.*)/admin-lostpassword/$ /managedDir/admin/content/admin-lostpassword.php [L]
RewriteRule login/(.*)/$ /managedDir/index.php?user=$1 [L]
RewriteRule user.(.*)/page/(.*)/$ /managedDir/index.php?user=$1&page=$2
############################################################
I'm currently having a lot of trouble logging into
http://localhost/managedDir/login/client/ but I can login to:
http://localhost/managedDir/login/admin/
Here are the error.log:
[Sat May 28 16:57:13 2011] [error] [client 127.0.0.1] PHP Notice: Undefined index: user in C:\\xampp\\htdocs\\MDFramework\\index.php on line 133, referer: /managedDir/login/client/
[Sat May 28 16:57:13 2011] [error] [client 127.0.0.1] PHP Stack trace:, referer: /managedDir/login/client/
[Sat May 28 16:57:13 2011] [error] [client 127.0.0.1] PHP 1. {main}() C:\\xampp\\htdocs\\MDFramework\\index.php:0, referer: /managedDir/login/client/
[Sat May 28 16:57:14 2011] [error] an unknown filter was not added: DEFLATE
Here is the access.log:
127.0.0.1 - admin [28/May/2011:16:57:13 -0500] "POST /managedDir/ HTTP/1.1" 302 26661 "/managedDir/login/client/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1"
127.0.0.1 - admin [28/May/2011:16:57:14 -0500] "GET /managedDir/user.client/page/home/ HTTP/1.1" 200 4 "/managedDir/login/client/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1"
When I login to /login/admin/ it correctly loads the page and logs in. but when I login to /login/client/ it gives me a blank page.
How do I fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
问题可能是:
不要添加 DEFLATE 标头,因为您的网络服务器不理解它?
可能相关: http://www .divideandconquer.se/2008/02/27/an-unknown-filter-was-not-added-deflate/
The problem is probably:
Don't add the DEFLATE header because your webserver doesn't understand it?
Possibly relevant: http://www.divideandconquer.se/2008/02/27/an-unknown-filter-was-not-added-deflate/