mod_rewrite 帮助

发布于 2024-11-10 10:25:41 字数 1935 浏览 0 评论 0原文

我遇到了 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

-黛色若梦 2024-11-17 10:25:41

问题可能是:

[Sat May 28 16:57:14 2011] [error] an unknown filter was not added: DEFLATE

不要添加 DEFLATE 标头,因为您的网络服务器不理解它?

可能相关: http://www .divideandconquer.se/2008/02/27/an-unknown-filter-was-not-added-deflate/

The problem is probably:

[Sat May 28 16:57:14 2011] [error] an unknown filter was not added: DEFLATE

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/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文