yumyum
yumyum

Reputation: 132

Mod rewrite and $_GET variable

I have a really simple mod-rewrite rule :

RewriteRule ^(.*)$ index.php?url=$1 [PT,L]

As an example, it is transforming an url www.mysite.com/a/b to www.mysite.com?url=a/b

Issue here is that is does not allow to pass get parameters to my php.

Any clue on how to transform www.mysite.com/a/b?bar=42&foo=43 to www.mysite.com?url=/a/b&bar=42&foo=43

thanks in advance !

Upvotes: 1

Views: 641

Answers (1)

Miraage
Miraage

Reputation: 3464

RewriteRule . index.php?url=$1 [PT,L,QSA]

QSA = Query String Append

Upvotes: 3

Related Questions