Created
November 22, 2010 05:40
-
-
Save shazow/709572 to your computer and use it in GitHub Desktop.
Redirecting Wordpress blog post links to Posterous blog post links
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Redirect shazow.net/blog -> blog.shazow.net | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase /blog/ | |
# Keep serving static files | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
# Redirect the blog post slugs to Posterous equivalents (truncated to 45 chars) | |
RewriteRule ^[0-9]{4}/[0-9]{2}/[0-9]{2}/(.{1,45}).*$ http://blog.shazow.net/$1 [R=301,NE] | |
# Redirect the RSS feeds | |
RewriteRule ^feed.*$ http://feeds.feedburner.com/shazow?format=xml [R=301] | |
# Redirect the rest of the blog | |
RewriteRule .* http://blog.shazow.net/ [R=301,L] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment