Forum Moderators: mack
I use mod rewrite to change a blah-widget.html to a .php?blah=widget
the problem has arisen recently where if the widget is more than one word I cannot get php to grab more than the first word after urlencode then mod rewrite then urldecode.
Example:
I want to transfer the term "widget & brown" over a link
php creates the link site.com/blah-widget+%26+brown.html
I use mod rewrite to change the url to search.php?blah=widget+%26+brown and then use urldecode to try and get the term back. The problem is that the variable only ever grabs the first word (widget in this case). The rewrite rule I use it:
RewriteRule ^widget-(.+).html search.php?blah=$1
So am I getting it all wrong with the mod rewrite or is there something I should be doing with the php?
Thank you.
blah-widget+%26+brown.html
must only be becoming
search.php?blah=widget
instead of
search.php?blah=widget+%26+brown
so what is wrong with the rewrite line:
RewriteRule ^blah-(.+).html search.php?blah=$1
?
Are there any tips on passing & (&) through a url and is it a known issue?