Created
December 14, 2011 22:08
-
-
Save whyisjake/1478786 to your computer and use it in GitHub Desktop.
MAKE .htaccess
This file contains hidden or 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
php_value max_execution_time 900 | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
AddDefaultCharset UTF-8 | |
# BEGIN SJA | |
RedirectMatch /.svn(/|$) https://encrypted.google.com/search?q=script+kiddie | |
RedirectMatch /readme.html https://encrypted.google.com/search?q=script+kiddie | |
#added by Chris Stone | |
RewriteRule !\.html$ - [S=2] | |
##RewriteRule ^(archive/[0-9]{4}/[0-9]{2}/)([^_]*)_([^_]*_.*) /$1$2-$3 [L,R=301] | |
RewriteRule ^(archive/[0-9]{4}/[0-9]{2}/)([^_]*)_([^_]*_.*) $1$2-$3 [DPI,N] | |
RewriteRule ^(archive/[0-9]{4}/[0-9]{2}/)([^_]*)_([^_]*)$ /$1$2-$3 [L,R=301] | |
#RewriteRule ^archive/[0-9]{4}/[0-9]{2}/([^/]*?)_([^/]*?_[^/]*)$ $1-$2 [N] | |
#RewriteRule ^archive/[0-9]{4}/[0-9]{2}/([^/]*?)_([^/_]*)$ $1-$2 [R=301] | |
RewriteRule ^archive/([a-zA-Z_]+)/?$ /archive/category/$1 [R=302,L] | |
RewriteRule ^archive/([a-zA-Z_]+)/index.xml$ /archive/category/$1/feed [R=301,L] | |
RewriteRule ^archive/([0-9]{4})/([0-9]{2})/index.html$ /archive/$1/$2 [R=301,L] | |
RewriteRule ^([0-9]+)\.html$ /page/$1 [R=302,L] | |
RewriteRule ^archive/([a-zA-Z]+)/([0-9]+)\.html$ /archive/category/$1/page/$2 [R=301,L] | |
RewriteRule ^archive/([a-zA-Z]+)/\?p=([0-9]+)$ /archive/category/$1/page/$2 [R=301,L] | |
RewriteRule ^cgi-bin/mt/mt-search\.cgi(.*)$ http://%{SERVER_NAME} [R=301,L] | |
RewriteCond %{QUERY_STRING} ^blog_id=[0-9]+&Template=tag_display&tag=(.*)$ | |
RewriteRule ^(.*)$ http://%{HTTP_HOST}/tag/$1? [R=301,L] | |
#RewriteRule ^tag/@(.*)$ /tag/$1 [R=301,L] | |
#added by chenley | |
#RewriteRule ^tag/(.*)$ /archive/tag/$1/ [L] | |
#RewriteRule ^tag/(.*)$ /archive/tag/$1 [R=301,L,NE] | |
#RewriteRule ^tag/(.*)\+(.*)$ /tag/$1$2 [R=301,L] | |
RewriteRule ^archive/category/woodworking-2$ /archive/category/woodworking [R=301,L] | |
#RewriteRule ^archive/category/metalworking-2$ /archive/category/metalworking [R=301,L] | |
#added by chenley | |
RewriteRule ^podcast(.*)$ /video/$1 [R=301,L] | |
#podcast for iTunes | |
RewriteRule ^archive/2006/05/make-podcast-andrew-filos.html$ /archive/category/make_podcast/feed [R=301,L] | |
#Random Files | |
RewriteRule ^archives.html$ /archives/ [R=301,L] | |
RewriteRule ^index.html$ / [R=301,L] | |
RewriteRule ^blog/archive/make_podcast/$ /archive/category/make_podcast [R=301,L] | |
RewriteRule ^index.xml$ /feed/ [R=301,L] | |
#RewriteRule ^altoidsGuitar.jpg$ /archive/2008/03/altoids-tin-guitar.html [R=301,L] | |
#Feedburner | |
#RewriteCond %{REQUEST_URI} ^/?(feed.*|comments.*) [NC] | |
#RewriteCond %{HTTP_USER_AGENT} !^.*(FeedBurner|FeedValidator) [NC] | |
#RewriteRule ^(/?.*)index.xml$ $1feed/ [R=301,L] | |
RewriteRule ^(/?.*)feed/rss(/?)$ $1feed/ [R=301,L] | |
RewriteRule ^(/?.*)index.rdf$ $1feed/ [R=301,L] | |
RewriteRule ^(/?.*)iphone.xml$ $1feed/ [R=301,L] | |
RewriteRule ^(/?.*)yb.xml$ $1feed/ [R=301,L] | |
#RewriteRule ^feed/?.*$ http://feeds.feedburner.com/makezineonline [L,NC,R=301] | |
#RewriteRule ^comments/?.*$ http://feeds.feedburner.com/CommentsForMakeOnline [L,NC,R=301] | |
#WRITE REDIRECT RULES FOR FAVICON BY HTTPHOST | |
# END SJA | |
</IfModule> | |
# BEGIN WPSuperCache | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
AddDefaultCharset UTF-8 | |
RewriteCond %{REQUEST_METHOD} !POST | |
RewriteCond %{QUERY_STRING} !.*=.* | |
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$ | |
RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC] | |
RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC] | |
RewriteCond %{HTTP:Accept-Encoding} gzip | |
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz -f | |
RewriteRule ^(.*) "/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html.gz" [L] | |
RewriteCond %{REQUEST_METHOD} !POST | |
RewriteCond %{QUERY_STRING} !.*=.* | |
RewriteCond %{HTTP:Cookie} !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$ | |
RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC] | |
RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC] | |
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html -f | |
RewriteRule ^(.*) "/wp-content/cache/supercache/%{HTTP_HOST}/$1/index.html" [L] | |
</IfModule> | |
# END WPSuperCache | |
# WordPress block needs to stay at bottom | |
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.php [L] | |
</IfModule> | |
# END WordPress |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment