How to use # in reqular expression in pup htaccess file

I need to use # in this regex, but after that he commented out all the characters (#)

RewriteRule ^([a-zA-Z0-9_-]+)?/?([ a-zA-Z0-9@ #$&%_"'\{\}:\,\-]+) 

can someone help me, how can I use # not for comments ... I used #, but it doesn’t work thanks for any help.

+4
source share
1 answer

It looks like you can overlap the second class of characters.

Check out the accepted answer to this SO question:

htaccess regexp Underline and Space not working

Not knowing that in fact the purpose of this RewriteRule makes any further assistance difficult. I would recommend looking at the RewriteRule flags to see if there is anything useful you can use there, for example the noescape [NE] flag:

http://httpd.apache.org/docs/current/rewrite/flags.html

0
source

Source: https://habr.com/ru/post/1492570/


All Articles