forked from jsbin/jsbin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
31 lines (23 loc) · 838 Bytes
/
.htaccess
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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>