lukehoban/jsbin/master/public/.htaccess - Htaccess File

lukehoban/jsbin/master/public/.htaccess

<IfModule mod_rewrite.c>

# $Id: .htaccess,v 1.3 2006/11/09 09:08:14 remy Exp $
Options +FollowSymLinks +ExecCGI
RewriteEngine On
RewriteBase /

# strip www. from the domain
RewriteCond %{HTTP_HOST} ^www.jsbin.com$ [NC]
RewriteRule ^(.*)$ http://jsbin.com/$1 [R=301,L]

# following two versions controlled through config.php
# rule to allow dynamic versioning of our code when live and hit a sprocketized script
# generic rule for future projects, but could be js/([0-9.]+)/jsbin.js js/jsbin-$1.js
RewriteRule js/([0-9.]+)/(.*).js js/$2-$1.js [QSA]

# role a sprocket for offline and debug
RewriteRule js/debug/.*.js$ sprocketize.php [QSA]
# RewriteRule .js$ sprocketize.php [QSA]
# RewriteRule .css$ lib/sprocketize.php [QSA]

RewriteRule js/render/remote.js$ sprocketize.php [QSA]

# if the file or directory exists
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule .* - [L]

RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^(.*)$ $1.html [L]

# using 'index.php' because it forces a '/' request to the handler
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>

On Github License

Files

Download PDF of Htaccess file
HTTP_HOST, REQUEST_FILENAME

Comments

Apache