Skip to content

Instantly share code, notes, and snippets.

@robertopc
Created March 5, 2021 22:43
Show Gist options
  • Save robertopc/3cd68ea4d2f8a8727c4ae479a7387a80 to your computer and use it in GitHub Desktop.
Save robertopc/3cd68ea4d2f8a8727c4ae479a7387a80 to your computer and use it in GitHub Desktop.
Cordova web app htaccess
RewriteEngine on
# Don’t rewrite files or directories
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
# Rewrite everything else to index.html to allow HTML5 state links
RewriteRule ^ index.html [L]
@Ariel-International
Copy link

Hello, does it work in browser mode?
Can't figure that out so far (5 mins!)

@robertopc
Copy link
Author

Hello, does it work in browser mode? Can't figure that out so far (5 mins!)

Put aside index.html in the server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment