Forum Moderators: phranque
RewriteEngine On
RewriteBase /
RewriteRule ^artiste/([^&]+)/albums/([^&]+)\.htm$ /template_music.php?artiste=$1&album=$2 [L]
and it works fine, but i recently discovered that i can't pass more var thru the url
eg. http://example.com/artiste/var1/albums/var2.htm (the is the rewritten URL)
but when i pass more vars in the url, php doesn't catch it.
eg. http://example.com/artiste/var1/albums/var2.htm?com_p=2
php will not catch $_GET['com_p']
how do rewrite the url to accommodate more var after the url is rewritten?
[edited by: jdMorgan at 10:38 pm (utc) on Aug. 16, 2008]
[edit reason] example.com [/edit]
To pass query string variables through a rewrite which replaces the query string as yours does, use the [QSA] flag:
RewriteRule ^artiste/[b]([^/]+)[/b]/albums/[b]([^./]+)[/b]\.htm$ /template_music.php?artiste=$1&album=$2 [b][QSA,L][/b]