问题
I want to show the URL
http://www.example.com/about-us.php?p=ceo-greeting
as
http://www.example.com/about-us/ceo-greeting
How can I do so using .htaccess
?
回答1:
RewriteEngine On
RewriteRule ^about-us/(.*) /about-us.php?p=$1
回答2:
Here's the complete documentation on mod_rewrite.
http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html
来源:https://stackoverflow.com/questions/4564338/how-can-i-change-a-url-using-htaccess