问题
1.Can I use RewriteRule with url parameters ?Ex: www.foo.com/user/admin/?html=edit
where: html=edit used to display form to edit user profile.
2.Can I find a good docs about RewriteRule apache module.
回答1:
yes you can,
Simple add the following in your .htaccess
RewriteEngine On
RewriteRule ^user/(.*)/(.*) index.php?module=user§ion=$2 [L]
now in your index you'll find the get params sent as get params you can also access it via $_SERVER['REQUEST_URI']
来源:https://stackoverflow.com/questions/9754787/apache-rewriterule-with-url-parameters