I'm using jquery address and everything is working great except for one small issue inside my .htaccess file. I'd like to redirect one of my urls that includes a hashmark to another URL.
Here is my current setup using redirect (that works):
Options +FollowSymLinks
RewriteEngine on
RewriteRule view_profile=(.*)$ view_profile.php?id=$1
If a user logs in at any point this URL doesn't work because my jquery address looks like this:
http://localhost/#view_profile=5
If I add the leading hash as part of my rewriterule it breaks. Does anyone know if it's possible to use a leading hashmark as part of the URL?
No you can't do this, as anything after the # is a fragment identifier and therefore not sent to the server.
See the RFC on URIs here: https://www.rfc-editor.org/rfc/rfc3986#section-3.5
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With