What i am attempting to do is very simple but no stackoverflow solutions address this exactly:

How do you use .htaccess to place a hash tag between the bottom url and also the route asked for?



will end up


i wish to use .htaccess because i seem like its a cleaner solution than server side php. it the main reason i'm able to do the reason being i am using jquery address that takes within the links around the page changing the href attribute. it simply breaks when the hash tag is not correctly getting place in.

Only use bog-standard mod_rewrite using the "no-escape" (NE) option:

RewriteRule ^shop /\#/shop [R=301,L,NE]

The hash/number symbol (#) itself includes a special significance inside a URL, which means you cannot dependably put it in to the path of the URL. This can be done:

RewriteRule ^shop(.*) /hash/shop$1 [R=301,L]