-
-
Save kyleslattery/235623 to your computer and use it in GitHub Desktop.
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
# Pretty sure you can't do a range of numbers like ([01-31]) | |
# Instead, you'll have to do ([0-3]?[0-9]): | |
# I also condensed the separate years into one rule | |
#RewriteEngine On | |
#RedirectMatch 301 /(2006|2007|2008|2009)/([0-1]?[0-9])/([0-3]?[0-9]))/(.*)$ http://old.bleikamp.com/$1/$2/$3/$4 | |
#Ok, here's an updated one: | |
RewriteEngine On | |
RewriteRule ^(2006|2007|2008|2009)/([0-1]?[0-9])/([0-3]?[0-9])/(.*) http://old.bleikamp.com/$1/$2/$3/$4 [R=301] | |
# You'll also need rules for each of the different URL levels: | |
RewriteRule ^(2006|2007|2008|2009)/([0-1]?[0-9])/([0-3]?[0-9]) http://old.bleikamp.com/$1/$2/$3 [R=301] | |
RewriteRule ^(2006|2007|2008|2009)/([0-1]?[0-9]) http://old.bleikamp.com/$1/$2 [R=301] | |
RewriteRule ^(2006|2007|2008|2009) http://old.bleikamp.com/$1 [R=301] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment