54edeec1e4e7

Merge
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Thu, 17 Jun 2010 01:11:00 -0400
parents 1ce08f2b3085 (diff) 9d3b2c25d5d7 (current diff)
children b365f62c99b7
branches/tags (none)
files

Changes

--- 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
--- 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')
 
--- /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;
+        }
+    }
+}
+