mirror of
https://github.com/jsbin/jsbin.git
synced 2026-02-01 16:46:05 +00:00
32 lines
838 B
ApacheConf
32 lines
838 B
ApacheConf
php_flag magic_quotes_gpc Off
|
|
|
|
<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]
|
|
|
|
# role a sprocket for offline and debug
|
|
RewriteRule js\/debug\/.*\.js$ php/sprocketize.php [QSA,L]
|
|
|
|
# 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]
|
|
|
|
# this makes serves up the public asset if it exists
|
|
RewriteCond public/$1 -F
|
|
RewriteRule ^(.*)$ public/$1 [QSA,L]
|
|
|
|
# using 'index.php' because it forces a '/' request to the handler
|
|
RewriteRule ^(.*)$ index.php [QSA,L]
|
|
</IfModule>
|