-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess-example
35 lines (28 loc) · 1.02 KB
/
.htaccess-example
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
32
33
34
# Sandbox Publisher
# .htaccess
#
# @author Michael Haschke @ eye48.com
# @version $Id$
# please replace '/path/to/index.php' by
# the location of the bootstrap file on your server (base url)
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
### Redirect requested web folder to URI with ending slash
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{REQUEST_URI} !/$
RewriteRule . %{REQUEST_URI}/ [R=permanent,L,QSA]
### Redirect all other stuff the Sandbox
### read bottom-up
# AND only for HTM(L) files
RewriteCond %{REQUEST_URI} \.html$ [NC]
# --edit-- # OR for not existing files
# --edit-- RewriteCond %{REQUEST_FILENAME} !-f [OR]
# for real files
RewriteCond %{REQUEST_FILENAME} -F
# Redirect to Sandbox Publisher
RewriteRule . /path/to/index.php [L,QSA]
# Fallback for PHP running as CGI
# RewriteRule . /path/to/index.php?request=%{REQUEST_URI} [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L,QSA]
</IfModule>