Good day everyone, I need help on .htaccess
Two days I can not understand how it works, that just did not try.
To the point, there is a link:
domain.ru/s_shoping/shop?sid=253%23modal/bundle/82522
It has the character %23
, I need to replace with ( #
) hash. Such links appear for example if you share a link in Skype on ios, maybe in other programs there is the same problem
As I just did not try to write:
RewriteRule ^(/shop\?sid=[0-9]*)?%23(modal/bundle/[0-9]*)$ /shop\?sid=$1#modal/bundle/$2 [NE,R=301,L] RewriteRule ^(.*)?%23(.*)?$ $1#$2 [NE,R=301,L]
In general, I tried a dozen variants, with different flags, additional modules, etc. but all is useless ... Where am I making a mistake? If you use one group, then everything works, if two are already broken (or if any character behind the group doesn’t work either) There is nothing special in these regulars ... Or maybe you can do with changing the encoding ...
Thanks in advance for any hint
RewriteCond %{QUERY_STRING} ^(.*?)%23(.*)$
And immediately after thisRewriteRule ^/(s_shoping/shop)/?$ /$1?%1#%2 [R,NE,L]
- Wiktor Stribiżew