【发布时间】:2010-12-06 08:49:35
【问题描述】:
我们的应用程序在我们的 PHP 应用程序中使用了重写规则,我们的开发人员将这些重写规则添加到了我们的 Apache VHosts 文件中:
我已根据以下建议更新了我们的重写规则。
目前我的 VHosts 文件配置如下所示:
RewriteCond %blog !-d 重写规则 ^/([a-zA-Z0-9-,]+)/?$ /index.php?a=$1
RewriteCond %blog !-d 重写规则 ^/([a-zA-Z0-9-,]+)/([a-zA-Z0-9-,]+)/?$ /index.php?a=$1&b=$2
RewriteCond %blog !-d 重写规则 ^/([a-zA-Z0-9-,]+)/([a-zA-Z0-9-,]+)/([a-zA-Z0-9-,]+)/?$ /index.php?a=$1&b=$2&c=$3
RewriteCond %blog !-d 重写规则 ^/([a-zA-Z0-9-,]+)/([a-zA-Z0-9-,]+)/([a-zA-Z0-9-,]+)/([ a-zA-Z0-9-,]+)/?$ /index.php?a=$1&b=$2&c=$3&d=$4&e=$5
我目前能够成功访问我们所有的其他应用程序选项卡,例如 /goods 等。但我仍然无法访问 www.test.com/blog
它仍然将我重定向到我们应用程序的主 index.php 页面。从重写日志:
[13/Oct/2009:17:08:41 --0400] [www.test.com/sid#8d03d8][rid#b902d8/initial] (1) 通过/blog/wp-login.php [13/Oct/2009:17:08:41 --0400] [www.test.com/sid#8d03d8][rid#b942f8/initial] (1) 继续 //public_html/index.php [OK ]
谢谢
【问题讨论】:
标签: php apache mod-rewrite