开发者

How can I change a URL using .htaccess?

I want to show the URL

http://www.example.com/about-us.php?p=c开发者_Python百科eo-greeting

as

http://www.example.com/about-us/ceo-greeting

How can I do so using .htaccess?


RewriteEngine On

RewriteRule ^about-us/(.*) /about-us.php?p=$1


Here's the complete documentation on mod_rewrite.

http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜