Skip to content

Instantly share code, notes, and snippets.

@fitoria
Created January 9, 2013 21:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fitoria/4496906 to your computer and use it in GitHub Desktop.
Save fitoria/4496906 to your computer and use it in GitHub Desktop.
configuración básica nginx y pelican
server {
#redirigiendo feed
rewrite ^/feed/ /feed.rss.xml permanent;
#redirigiendo about
rewrite ^/about/ /about.html permanent;
#redirigiendo feed de categoria
rewrite ^/category/([a-z-\d-\¿-\¡]+)/feed/ /category/$1.rss.xml permanent;
location / {
#redirigiendo entradas viejas hacia urls nuevas (solo se agrega el .html)
rewrite ^/(\d+)/(\d+)/([a-z-\d-\¿-\¡]+)/ /$1/$2/$3.html permanent;
}
#conservando ruta de imagenes y archivos cargados
location /wp-content/ {
alias /home/fitoria/wordpress/wp-content/;
}
#cache
location /theme/{
expires 720h;
}
error_page 404 /404.html;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment