开发者

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
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜