0
我在apache的特定重写规则上挣扎。更确切地说,我正在努力弄清楚它有什么问题。用重写规则挣扎
我需要重写URL像这样:
http://www.mysite.com/section/venue_info/123/name
or
http://www.mysite.com/section/venue_info/123/
or
http://www.mysite.com/section/venue_info/123
|
V
http://www.mysite.com/section/venue_info.php?id=123
注意section
是方程式中的一个变量。在现场,它可以是多个值中的一个,因此无论提供哪个部分,都需要使用该部分。我在我的apache配置中有这个:
DocumentRoot /var/www/site/trunk/publish
<Directory /var/www/site/publish/trunk/>
Options -Indexes +FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
RewriteEngine on
RewriteBase/
RewriteRule ^\/(\w+)\/venue_info\/(\d+)(\/.+|\/?)$ $1/venue_info.php?id=$2
</Directory>
但是这不匹配。我尝试了各种各样的变化,但没有运气。这里有什么合适的RewriteRule
?任何帮助表示赞赏。