Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: aea4b15d0f
Fetching contributors…

Cannot retrieve contributors at this time

34 lines (25 sloc) 1.057 kb
<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]
# 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>
Jump to Line
Something went wrong with that request. Please try again.