Append a parameter to a querystring with mod_rewrite
snippet in htaccess

Append a parameter to a querystring with mod_rewrite

user6358

RewriteEngine on
RewriteBase /
RewriteCond %{QUERY_STRING} !weight=
RewriteRule ^script.php     script.php?weight=heavy [R,L,QSA]

Append a parameter to a querystring with mod_rewrite

user5802

RewriteCond %{QUERY_STRING} !weight=heavy
RewriteRule /script.php /script.php?weight=heavy [QSA]