I need to rewrite some site. I need to rewrite the site when it has one or more of any variables e.g.:
mysite.com/site.php?id=5 or
mysite.com/site.php?id=5&other_variable=233 or
mysite.com/site.php?id=5&any_stuff_here(numbers-letters-spacial_chars)
I tried some htaccess rules but it doesn't work.
Actually my rule looks like :
RewriteCond %{QUERY_STRING} ^id=5$ [or]
RewriteCond %{QUERY_STRING} ^id=5$
RewriteRule ^site\.php$ http://mysite.com/folder/5_some_txt.html? [L,R=301]
First condition works fine for just one variable, the second one is now the same as first one(I'm trying to put something here to handle the rest of the variables in url). I think I need to change it somehow or maybe there is a better way to achive what I'm trying to do.
Can anyone help me with this?
Edit:I have also a rule like this in the same htaccess file:
RewriteRule ^site/([0-9]+)_(.*).html$ site.php?id=$1&name=$2 [L,NC,NS]