Goal: Match URL and rewrite it to a query string.
Problem: Looks like the "#" (and everything after it) in the replacement string is being ignored.
Here's what I have:
RewriteEngine On
RewriteRule ^([^\.]+)$ $1.html [NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/([^/]+) web2.html#list?d=$1&n=$2 [L,NE]
This gets to web2.html
but the url parameters (d= & n=
) are never applied.
The goal is to allow a url like: somewehere.com/55c26838e4b087b032b432c4/1/
to trigger a query like this: somewehere.com/web2#list?d=54668494e4b09ffed41ff167&n=1
Hash-tags are used on client-side only. Try to redirect your request, with
R
flag specified.If that doesn't work fork for you, take a look at HTML5 History API. I think
pushState
method can help you.