-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
38 lines (28 loc) · 1.3 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
37
RewriteEngine On
# May be required to access sub directories
#RewriteBase /
# Ignore real files (images, stylesheets etc.)
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule (.*) - [NC,L]
# Rewrite 1 - For request via www.student.bth.se
RewriteCond %{HTTP_HOST} ^www\.student\.bth\.se$ [NC]
RewriteRule ^image/(.*)$ /~joki20/dbwebb-kurser/design/me/portfolio/assets/cimage/img.php?src=$1 [QSA,NC,L]
RewriteCond %{HTTP_HOST} ^www\.student\.bth\.se$ [NC]
RewriteRule (.*) /~joki20/dbwebb-kurser/design/me/portfolio/index.php/$1 [NC,L]
# Rewrite 2 - For other requests
RewriteCond %{HTTP_HOST} !^www\.student\.bth\.se$ [NC]
RewriteRule ^image/(.*)$ assets/cimage/img.php?src=$1 [QSA,NC,L]
# Deny access to internal dirs and files by passing the URL to Pico
RewriteRule ^(config|content|vendor|CHANGELOG\.md|composer\.(json|lock|phar))(/|$) index.php [L]
RewriteRule (^\.|/\.)(?!well-known(/|$)) index.php [L]
RewriteCond %{HTTP_HOST} !^www\.student\.bth\.se$ [NC]
RewriteRule (.*) index.php/$1 [NC,L]
# Enable URL rewriting - default Pico settings
# RewriteCond %{REQUEST_FILENAME} !-f
# RewriteCond %{REQUEST_FILENAME} !-d
# RewriteRule ^ index.php [L]
# Let Pico know about available URL rewriting
SetEnv PICO_URL_REWRITING 1
# Prevent file browsing
Options -Indexes -MultiViews