trajano/trajano.github.io/backup/.htaccess - Htaccess File

trajano/trajano.github.io/backup/.htaccess

# Do not remove this line, otherwise mod_rewrite rules will stop working

RewriteEngine On
RewriteBase /
RewriteRule ^wp-comments-post.php - [R=404,L,NC]
RewriteRule ^wp-trackback.php - [R=404,L,NC]
AddType text/css .css
AddType text/plain .txt

RewriteRule ^author/trajano/$ http://plus.google.com/+ArchimedesTrajano/ [R,L]
RewriteRule ^feeds/posts/default ?feed=atom [R,L]
RewriteRule ^ujRZCXbH9nkp80MpLMRBCUg0HdM.html ujRZCXbH9nkp80MpLMRBCUg0HdM.html [L]

# Really Static removal
RewriteRule ^wp-content/plugins/really-static/static/(.*) $1 [L,R=301,NC]

# Posterous posts
RewriteRule ^providing-context-helps$ 2012/04/providing-context-helps/ [R=301,L]
RewriteRule ^posterous-currently-not-the-right-one-for-me$ 2011/01/posterous-currently-not-the-right-one-for-me/ [R=301,L]

# LiveJournal posts
RewriteRule ^12361.html$ 2004/08/migrating-to-maven/ [R=301,L]
RewriteRule ^26649.html$ 2005/03/oss-software-deaf-developers-unsatisfied-users/ [R=301,L]
RewriteRule ^24707.html$ 2005/03/move-getter-logic-to-constructor/ [R=301,L]
RewriteRule ^(d+.html)$ http://trajano.livejournal.com/$1 [R=301,L]

# Import issues
RewriteRule ^2013/02/quick-review-of-ubuntu-touch-for-phone 2013/02/quick-review-of-the-ubuntu-touch-for-phone/ [R=301,L]
RewriteRule ^2012/06/evaluating-mongodb-for-enterprise 2012/06/evaluating-mongodb-for-the-enterprise/ [R=301,L]
RewriteRule ^2012/06/leveraging-cloud-for-big-data 2012/06/leveraging-the-cloud-for-big-data/ [R=301,L]
RewriteRule ^2012/05/mongodb-with-maven 2012/06/mongodb-with-maven/ [R=301,L]
RewriteRule ^2012/04/going-to-android-4-0-4 2012/04/going-to-android-404/ [R=301,L]
RewriteRule ^2012/03/ideal-jpa-pattern 2012/03/the-ideal-jpa-pattern/ [R=301,L]
RewriteRule ^2008/08/uninstalling-db2-express-c-95 2008/08/uninstalling-db2-express-c-9-5/ [R=301,L]
RewriteRule ^2008/04/what-i-want-to-get-from-business 2008/04/what-i-want-to-get-from-the-business-analysts/ [R=301,L]
RewriteRule ^2007/12/agile-curam-development-requirements.html 2007/12/curam-requirements-proposals-and-estimating/ [R=301,L]
RewriteRule ^2007/10/disabling-back-button-in-curam.html 2007/10/disabling-the-back-button-in-curam/ [R=301,L]
RewriteRule ^2007/02/pop-fetching-in-gmail-and-yahoo-mail.html 2007/02/gmail-sucking-yahoo-mail/ [R=301,L]
RewriteRule ^2005/08/ejb-pattern-service-locator-with/ 2005/08/ejb-pattern-service-locator-with-remote-method-invocation/ [R=301,L]
RewriteRule ^2005/07/installing-freebsd-on-p133.html 2005/07/installing-freebsd-on-a-p133/ [R=301,L]
RewriteRule ^search/label/things.that.make.me.go.hmm category/hmm/ [R=301,L]

# Remove "m" parameter
RewriteCond %{QUERY_STRING} ^m=1$
RewriteRule ^(.*)$ $1? [R=301,L]

# Don't redirect anything in uploads

# General redirects
RewriteRule ^wp-content/plugins/really-static/static/(.*) $1 [R=301,L]
RewriteRule ^search/label/(w+) tag/$1/ [R=301,L]
RewriteRule ^tag/angular$ tag/angularjs [R=301,L]
RewriteRule ^archive/(dd)/(dddd) $2/$1/ [R=301,L]
RewriteRule ^(dddd)_(dd)_(dd)_archive.html$ $1/$2/ [R=301,L]
RewriteRule ^wp-content/uploads/.* - [S=1]
RewriteRule ^(.*).html$ $1/ [R=301,L]
# BEGIN WordPress

# WPhtC: Disable ServerSignature on generated error pages
ServerSignature Off

# WPhtC: Disable directory browsing
Options All -Indexes

# WPhtC: Protect WP-config.php
<files wp-config.php>
order allow,deny
deny from all
</files>

# WPhtC: Protect .htaccess file
<files ~ "^.*.([Hh][Tt][Aa])">
order allow,deny
deny from all
</files>

# WPhtC: Protect comments.php
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post.php*
RewriteCond %{HTTP_REFERER} !.*http://www.trajano.net.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]

# WPhtC: Setting mod_gzip
<ifModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</ifModule>

# WPhtC: Setting mod_deflate
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css application/x-javascript
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4.0[678] no-gzip
BrowserMatch bMSIE !no-gzip !gzip-only-text/html
Header append Vary User-Agent env=!dont-vary
</IfModule>

<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

On Github License

Files

Download PDF of Htaccess file
DEFLATE, HTTP_REFERER, HTTP_USER_AGENT, no-gzip, POST, QUERY_STRING, REMOTE_ADDR, REQUEST_FILENAME, REQUEST_METHOD, REQUEST_URI, static

Comments

Apache