I have this below URL and all # symbols needs to replaced with _
http://localhost/test/my#module/my#index.php?param2=10¶m2=10
i tried below .htaccess code, but not working. I searched a lot for solution , but none of them are working.
Options +FollowSymlinks -MultiViews
RewriteEngine on
# keep replacing space to hyphen until there is no space use internal rewrite
RewriteRule ^([#]*)[#]+(.*)$ $1-$2 [E=NOSPACE:1]
# when there is no space make an external redirection
RewriteCond %{ENV:NOSPACE} =1
RewriteRule ^([#]+)$ $1 [R=301,L]
Please let me how can fix this issue.
#and part after that is not sent to web server#and part after that will be ignored. Actually i tried your answer stackoverflow.com/questions/5821120/… , but not working for me.#. Browser doesn't send any text starting with#to web server._then they are getting replaced byspacethere by breaking URLs in SMS. So we need alternative to_in the url. So once the user hits that URLs then using htaccess we planning to replace alternate character with_. We can not use&and%. Can you please suggest on this ??