Skip to content

Instantly share code, notes, and snippets.

@fitoria
Created January 9, 2013 21:01
Show Gist options
  • Save fitoria/4496906 to your computer and use it in GitHub Desktop.
Save fitoria/4496906 to your computer and use it in GitHub Desktop.

Revisions

  1. fitoria created this gist Jan 9, 2013.
    26 changes: 26 additions & 0 deletions gistfile1.nginxconf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    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;
    }