Comments

Thanks for this. It was the one that finally worked for me (after trying several from other sites).
I enhanced mine because my app doesn't live off the webserver root. So mine looks like this:
RewriteEngine On
RewriteBase /dev/myapp/
# If the request is a file, folder or symlink that exists, serve it up
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+)$ - [S=1]
# otherwise, serve your index.html app
RewriteRule ^(.+)$ /dev/myapp/index.html
Plus I had to add:
<base href="/dev/myapp/">
to the header of my index.html - now it's all working beautifully and my URLs are free of ugly hashes. :)