Take the 2-minute tour ×

Sorry for posting this simple question, just because i have no time to study .htaccess from beginning due to my 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

share|improve this question

1 Answer 1

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
share|improve this answer

Your Answer


