Browse Source

Serve Tildes robots.txt on tild.es as well

merge-requests/82/merge
Deimos 5 years ago
parent
commit
bc527b0c70
  1. 8
      salt/salt/nginx/tildes-shortener.conf.jinja2

8
salt/salt/nginx/tildes-shortener.conf.jinja2

@ -1,3 +1,4 @@
{% from 'common.jinja2' import app_dir -%}
server { server {
listen 443 ssl http2; listen 443 ssl http2;
listen [::]:443 ssl http2; listen [::]:443 ssl http2;
@ -19,7 +20,12 @@ server {
return 301 https://tildes.net; return 301 https://tildes.net;
} }
# Will match all addresses *except* the root
# Serve the same robots.txt file as on the site itself
location = /robots.txt {
root {{ app_dir }}/static;
}
# Will match all addresses *except* exact matches above
location / { location / {
# Strip any trailing slash while redirecting # Strip any trailing slash while redirecting
rewrite ^/(.*)/?$ https://tildes.net/shortener/$1 permanent; rewrite ^/(.*)/?$ https://tildes.net/shortener/$1 permanent;

Loading…
Cancel
Save