查询字符串中的%26正在打破$ _GET部分

for this page

www.industrialstores.com/search_results/Bell+%26+Gossett+101238+1.25"+Sweat+ChecktroLFlangeset/46

I am not getting value in $_GET['s']

the value in $_GET['s'] should be Bell Gossett 101238 1.25" Sweat ChecktroLFlangeset but only Bell is passed into $_GET['s']

I already tried urldecode(), htmlentities but not of use.

My .httaccess file is like

RewriteRule ^([a-zA-Z0-9_-]{3,100})/([^/]+)/([^/]+)?$ index\.php?page=$1&s=$2&o=$3 [L]
RewriteRule ^([a-zA-Z0-9_-]{3,100})/([^/]+)/([a-zA-Z0-9_]+)/([^/]+)?$ index\.php?page=$1&s=$2&o=$3&p=$4 [L]
RewriteRule ^([a-zA-Z0-9_-]{3,100})/([^/]+)/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([^/]+)?$ index\.php?page=$1&s=$2&o=$3&p=$4&q=$5 [L]
RewriteRule ^([a-zA-Z0-9_-]{3,100})/([^/]+)/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([a-zA-Z0-9]+)/([^/]+)?$ index\.php?page=$1&s=$2&o=$3&p=$4&q=$5&r=$6 [L]

As Second Rikudo wrote, your rewrite rules are not accepting the & character (%26).

Try this;

RewriteRule ^([a-zA-Z0-9_-\&]{3,100})/([^/]+)/([^/]+)?$ index\.php?page=$1&s=$2&o=$3 [L]
RewriteRule ^([a-zA-Z0-9_-\&]{3,100})/([^/]+)/([a-zA-Z0-9_\&]+)/([^/]+)?$ index\.php?page=$1&s=$2&o=$3&p=$4 [L]
RewriteRule ^([a-zA-Z0-9_-\&]{3,100})/([^/]+)/([a-zA-Z0-9_\&]+)/([a-zA-Z0-9_\&]+)/([^/]+)?$ index\.php?page=$1&s=$2&o=$3&p=$4&q=$5 [L]
RewriteRule ^([a-zA-Z0-9_-\&]{3,100})/([^/]+)/([a-zA-Z0-9_\&]+)/([a-zA-Z0-9_\&]+)/([a-zA-Z0-9\&]+)/([^/]+)?$ index\.php?page=$1&s=$2&o=$3&p=$4&q=$5&r=$6 [L]

Also, these rewriterules are not really efficient. I would go with something like this;

RewriteRule ^(.*)$ index.php?route=$1 [L]

And then do all the matching in PHP. There are a lot of frameworks that have excellent routing built in, you can use that or build your own, using something like the explode() function in PHP.

The problem is than & (amperstand) char is a special char to apache (it separe parameters). So to identify this, use the [B] flag (In your case, append it after [L]:

RewriteRule ^([a-zA-Z0-9_-]{3,100})/([^/]+)/([^/]+)?$ index\.php?page=$1&s=$2&o=$3 [L,B]
RewriteRule ^([a-zA-Z0-9_-]{3,100})/([^/]+)/([a-zA-Z0-9_]+)/([^/]+)?$ index\.php?page=$1&s=$2&o=$3&p=$4 [L,B]
RewriteRule ^([a-zA-Z0-9_-]{3,100})/([^/]+)/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([^/]+)?$ index\.php?page=$1&s=$2&o=$3&p=$4&q=$5 [L,B]
RewriteRule ^([a-zA-Z0-9_-]{3,100})/([^/]+)/([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([a-zA-Z0-9]+)/([^/]+)?$ index\.php?page=$1&s=$2&o=$3&p=$4&q=$5&r=$6 [L,B]

The write rules works, is second group than matches "s" parameter: /([^/]+)/, it can replace by /.+/. Works well to, I tested.

Based on: htaccess rewrite rule with escaped ampersand in $_GET fails