0
我的mod_rewrite规则有一些问题。我想要处理三种不同的网址格式。Apache - mod_rewrite重写规则问题
- http://example.com/%module%/%view%-%args%.html
- http://example.com/%module%/%view%.html
- http://example.com/%module%
以下mod_rewrite的规则并没有真正的工作
。另外我有问题,查询(例如:user.html?foo = bar)没有效果。
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^([0-9A-Za-z_-]*)/?([0-9A-Za-z_]+)-?([0-9A-Za-z_,]*)\.html$ index.php?__module=$1&__view=$2&__argv=$3
RewriteRule ^([0-9A-Za-z_-]*)/?$ index.php?__module=$1&__view=&__argv=
</IfModule>
我正在研究一个PHP5框架,因为我喜欢编程和边做边学。如果您有兴趣:http://code.google.com/p/quail/。我想保持简单。 – alexvetter 2008-10-09 20:29:56