# HG changeset patch # User Steve Losh # Date 1276751460 14400 # Node ID 54edeec1e4e784d3ce3832aa125ebe3485c4b6a6 # Parent 1ce08f2b308582cb6d8ca90d256370865474fb48# Parent 9d3b2c25d5d7b758e0dcaf315a8ce770360e7f7a Merge diff -r 9d3b2c25d5d7 -r 54edeec1e4e7 content/.htaccess --- a/content/.htaccess Fri Jun 11 14:09:08 2010 -0400 +++ b/content/.htaccess Thu Jun 17 01:11:00 2010 -0400 @@ -9,7 +9,8 @@ RewriteRule ^blog/entry/(\d+)/(\d\d)/\d+/([^/]*)/?$ /blog/$1/$2/$3/ [R=301,L] RewriteRule ^blog/entry/(\d+)/(\d)/\d+/([^/]*)/?$ /blog/$1/0$2/$3/ [R=301,L] -{% hyde_listing_page_rewrite_rules %} +RewriteCond %{REQUEST_FILENAME}/index.html -f +RewriteRule ^(.*) $1/index.html # listing pages whose names are the same as their enclosing folder's RewriteCond %{REQUEST_FILENAME}/$1.html -f @@ -19,4 +20,4 @@ RewriteCond %{REQUEST_FILENAME}.html -f RewriteRule ^.*$ %{REQUEST_FILENAME}.html -ErrorDocument 404 /404.html \ No newline at end of file +ErrorDocument 404 /404.html diff -r 9d3b2c25d5d7 -r 54edeec1e4e7 fabfile.py --- a/fabfile.py Fri Jun 11 14:09:08 2010 -0400 +++ b/fabfile.py Thu Jun 17 01:11:00 2010 -0400 @@ -2,8 +2,8 @@ import os import fabric.contrib.project as project -PROD = 'sjl.webfactional.com' -DEST_PATH = '/home/sjl/webapps/slc/' +PROD = 'sl' +DEST_PATH = '/var/www/stevelosh.com/' ROOT_PATH = os.path.abspath(os.path.dirname(__file__)) DEPLOY_PATH = os.path.join(ROOT_PATH, 'deploy') diff -r 9d3b2c25d5d7 -r 54edeec1e4e7 nginx.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/nginx.conf Thu Jun 17 01:11:00 2010 -0400 @@ -0,0 +1,56 @@ +server { + listen 80; + server_name www.stevelosh.com; + rewrite ^/(.*) http://stevelosh.com/$1 permanent; +} +server { + listen 80; + server_name linode.stevelosh.com; + + access_log /tmp/stevelosh.com.access.log; + error_log /tmp/stevelosh.com.error.log; + + location / { + root /var/www/stevelosh.com/; + index index.html; + + if ($request_uri ~ ^/blog/entry/\d+/\d/\d+/[^/]*/?$) { + rewrite ^/blog/entry/(\d+)/(\d)/\d+/([^/]*)/?$ /blog/$1/0$2/$3/ permanent; + break; + } + + if ($request_uri ~ ^/blog/entry/\d+/\d\d/\d+/[^/]*/?$) { + rewrite ^/blog/entry/(\d+)/(\d\d)/\d+/([^/]*)/?$ /blog/$1/$2/$3/ permanent; + break; + } + + if ($request_filename ~ ^.*.html$) { + rewrite ^(.*).html$ $1/ permanent; + break; + } + + if (-f $request_filename) { + break; + } + + if ($request_uri ~ ^.+[^/]$) { + rewrite ^/(.*)$ /$1/ permanent; + break; + } + + if (-f $request_filename/index.html) { + rewrite ^(.*)/$ /$1/index.html; + break; + } + + if ($request_filename ~ ^.*/$) { + rewrite ^/(.*)/$ /$1; + } + + if (-f $request_filename.html) { + rewrite ^/(.*)$ /$1.html; + break; + } + } +} +