Hi all, can somebody help me to find a way to match the special character "#" in source url?
For example, the source url is : https://www.example.com/al/bl/cl#dl/el, I want to redirect it to : https://www.example.com/fl/gl
I was tried to use the following redirect condition, unfortunately, they are all can not work for me. thanks in advance.
1,
RewriteCond %{HTTP_HOST} ^.*example.com$
RewriteRule ^/al/bl/cl#dl/el$ /fl/gl? [NE,R=301,L]
2,
RewriteCond %{HTTP_HOST} ^.*example.com$
RewriteRule ^/al/bl/cl\#dl/el$ /fl/gl? [NE,R=301,L]
3,
RewriteCond %{HTTP_HOST} ^.*example.com$
RewriteCond %{QUERY_STRING} ^/al/bl/cl#dl/el$
RewriteRule ^(.*)$ /fl/gl? [NE,R=301,L]
4,
RewriteCond %{HTTP_HOST} ^.*example.com$
RewriteCond %{QUERY_STRING} ^/al/bl/cl\#dl/el$
RewriteRule ^(.*)$ /fl/gl? [NE,R=301,L]
They are all redirect to :https://www.example.com/fl/gl#dl/el, rather than redirec to https://www.example.com/fl/gl