开发者

rewrite url using .htaccess

开发者 https://www.devze.com 2023-02-24 05:32 出处:网络
Sorry for posting this simple question, just because i have no time to study .htaccess from beginning due to m开发者_如何学JAVAy homework deadline is coming.

Sorry for posting this simple question, just because i have no time to study .htaccess from beginning due to m开发者_如何学JAVAy homework deadline is coming.

basically i want to format http://abc.com/group.php?g=def to become http://abc.com/def using .htaccess

one more important thing is there maybe other parameters appending after def for example http://abc.com/group.php?g=def&c=kama etc, the url rewrite should allow something like http://abc.com/def&c=kama


Here is the code :

RewriteRule ^([a-z0-9]+)$ group.php?g=$1
RewriteRule ^([a-z0-9]+)&c=([a-z0-9]+)$ group.php?g=$1&c=$2
0

精彩评论

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