开发者

How can I change a URL using .htaccess?

开发者 https://www.devze.com 2023-02-01 15:39 出处:网络
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

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

精彩评论

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

关注公众号