-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx_rmwebsite.conf
34 lines (24 loc) · 997 Bytes
/
nginx_rmwebsite.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
server {
listen 80;
server_name readymag.com;
root "/path/to/project_folder"; # Change path to folder with downloaded source
index index.html;
access_log off;
autoindex off;
charset utf-8;
location / {
if (-f $request_filename ) { break; }
if ($args ~ "_escaped_fragment_") {
rewrite ^/([.a-zA-Z0-9-]+)/? /snippets/$1.html last;
rewrite ^/ /snippets/1.html last;
}
location = / {
if ($args ~ "_escaped_fragment_") {
rewrite ^/ /snippets/1.html last;
}
}
rewrite ^/?$ /index.html last;
rewrite ^/[.a-zA-Z0-9-]+(/(.*))? /$2 last;
try_files $uri $uri/;
}
}