目前我在我的 .htaccess 中有这个重写规则来[value]
传递http://www.site.com/[value]
给/page?q=[value]
RewriteRule ^([a-zA-Z0-9_-]+)$ page?q=$1
RewriteRule ^([a-zA-Z0-9_-]+)/$ page?q=$1
我怎样才能实现以下额外的重写:
http://www.site.com/foo/1
-> http://www.site.com/page?param=1
http://www.site.com/bar/1
-> http://www.site.com/page?param2=1
http://www.site.com/baz/1
->http://www.site.com/page2?param=1