Reputation: 19315
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?
Upvotes: 2
Views: 590
Reputation: 11252
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.
Upvotes: 1