I would like to pass an additional parameter using the a href tag in a link which is already handled by this rule in htaccess
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} libwww-perl.*
RewriteRule .* . [F,L]
RewriteBase /
RewriteRule ^([^/] )/contact.html contact.php?ln=$1 [L]
the link I would like to use is this
/en/contact.html?t=Build 5
then to the page should contact.php?ln=en&t=Build 5.
If I print in contac.php the $ _GET returns only ln = en.
How can I do?
Thank you Thank you
CodePudding user response:
You have to use [L,QSA] in your rule, to get your parameters.
RewriteRule ^([^/] )/contact.html contact.php?ln=$1 [L,QSA]
See [QSA] (QueryStringAppend)
