Is it possible to remove the # symbol from angular.js URLs?
I still want to be able to use the browser\'s back button, etc, when I change the view and will update th
This answer assumes that you are using nginx as reverse proxy and you already did set $locationProvider.html5mode to true.
->For the people who might still be struggling with all cool stuff above.
Surely, @maxim grach solution works fine, but for the solution for how to respond to requests that doesn't want the hashtag to be included in the first place what can be done is check if php is sending 404 and then rewrite the url. Following is the code for nginx,
In the php location, detect 404 php error and redirect to another location,
location ~ \.php${
...
fastcgi_intercept_errors on;
error_page 404 = /redirect/$request_uri ;
}
Then rewrite url in redirect location and proxy_pass the data, offcourse, put your website url at the place of my blog's url. (Request : Question this only after you tried it)
location /redirect {
rewrite ^/redirect/(.*) /$1;
proxy_pass http://www.techromance.com;
}
And see the magic.
And it definitely works, atleast for me.