Created
June 26, 2014 08:21
-
-
Save mallowigi/2fb57a111dd82665268b to your computer and use it in GitHub Desktop.
This file contains hidden or 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 hidden or 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 hidden or 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