-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess.example
executable file
·27 lines (22 loc) · 1.16 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
RewriteEngine On
# We do fancy stuff with the requested book title and author name here
RewriteRule ^item+/[^/]+/([^/]+)$ src/web/item.php?id=$1 [L,NC,QSA]
RewriteRule ^author+/([^/]+)$ src\/web\/author.php?author=$1 [L,NC,QSA]
# If the user didn't request a page, just asked for the root, serve up index
RewriteRule ^$ src\/web\/index.php [L,NC,QSA]
# If the user didn't request a page, but something in a web subdir, serve here
RewriteRule ^css/(.*)$ src\/web\/css\/$1 [L,NC,QSA]
RewriteRule ^images/(.*)$ src\/web\/images\/$1 [L,NC,QSA]
RewriteRule ^js/(.*)$ src\/web\/js\/$1 [L,NC,QSA]
RewriteRule ^stackview/(.*)$ src\/web\/stackview\/$1 [L,NC,QSA]
RewriteRule ^translators/(.*)$ src\/web\/translators\/$1 [L,NC,QSA]
RewriteRule ^about(.*)\/?$ src\/web\/about.php [L,NC,QSA]
RewriteRule ^search(.*)\/?$ src\/web\/search.php [L,NC,QSA]
RewriteRule ^privacy(.*)\/?$ src\/web\/privacy.php [L,NC,QSA]
# If the user requested a specific page, serve it up here
RewriteRule ^([^/]+)\/?$ src\/web\/$1 [L,NC,QSA]
RewriteCond %{HTTP:Accept-Encoding} gzip
RewriteCond %{REQUEST_FILENAME}.jgz -f
RewriteRule (.*)\.js$ $1\.js.jgz [L]
AddType "text/javascript" .js.jgz
AddEncoding gzip .jgz