Last active
August 29, 2015 14:06
-
-
Save chussenot/7a321f77c55e978ee1f8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.config(function (...) { | |
$locationProvider.html5Mode(true); | |
$locationProvider.hashPrefix = '!'; | |
... | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
<head> | |
<!--use absolute paths for file refs--> | |
<link rel="stylesheet" href="/styles/main.css"> | |
... | |
<base href="/"> | |
... | |
</head> | |
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
set $host_path "/path/to/your/app"; | |
root $host_path; | |
index index.html; | |
# SEO | |
if ($args ~ "_escaped_fragment_=/?(.+)") { | |
set $path $1; | |
rewrite ^ /snapshots/$path last; | |
} | |
# Re-route nested routes through index | |
location / { | |
try_files $uri $uri/ /index.html =404; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment