views:

160

answers:

1

Hi,

I have a page that already has the $_GET array initialized, and when a page redirects there (with an oAuth token) it appends the ?token=36264747 to the end.

Is there a way to write an .htaccess file for an Apache server that would either strip that question mark or (better) replace it with an ampersand?

+1  A: 

You need the qsappend or QSA (query string append) flag for RewriteRule:

RewriteRule ^foo(.*)bar$ index.php?token=$1 [QSA]

will append token=$1 to the query string (the $_GET part), using ? or & as appropriate.

Wim
@Wim, aah! Don't you just love it when it's 5:34 AM and SO's a lifesaver?
Frankie