-
Notifications
You must be signed in to change notification settings - Fork 8
/
.htaccess
36 lines (31 loc) · 1.18 KB
/
.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
32
33
34
35
36
#AuthName "Restricted Area"
#AuthType Basic
#AuthUserFile /var/www/shk/main/.htpasswd
#AuthGroupFile /dev/null
#require valid-user
# Disabling the annoying magic quotes (http://www.php.net/manual/en/security.magicquotes.disabling.php):
php_flag magic_quotes_gpc Off
# Rewriting of routes:
RewriteEngine on
Options +FollowSymlinks -MultiViews
RewriteBase /
# Rule for minified JavaScript:
RewriteRule ^(js/App-minified)\..+(\.js)$ $1$2 [L]
# Rule to ignore subdirectories that are necessary:
RewriteRule ^(admin|css|export|img|js|query|sound|templates).* - [L]
# Rule to match usual requests:
RewriteCond %{QUERY_STRING} (.+)
RewriteRule ^$ - [L]
# Rule to match project routes:
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^projects/(.*)$ query/projects?name=$1 [L]
# We use shortLinks if the query is empty, except for hl:
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^(.+)$ #/$1 [R,NE]
# If we've got a query, we redirect to root:
RewriteCond %{QUERY_STRING} (.+)
RewriteRule ^.+$ ?%1 [R,NE]
# Rules to aid searching
# FIXME figure out if searching is used/implemented/required!
#RewriteRule ^go/([^/]+)/([^/]*) ?search1=$1&search2=$2 [R,NC]
#RewriteRule ^go/([^/]*) ?iso=$1 [R,NC]