rewrite url using .htaccess
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
精彩评论