-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.htaccess
54 lines (43 loc) · 1.56 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# carbage collection op de server wordt door een cronjob geregeld
<IfModule mod_php5.c>
php_value session.gc_probability 0
php_value memory_limit 1024M
php_value max_execution_time 600
</IfModule>
# Bestanden en directories beschermen
<FilesMatch "\.(htaccess|log|php|twig|yml)$|^\..*$">
Order Allow,Deny
Deny from all
</FilesMatch>
<FilesMatch "app\.php$">
Order Allow,Deny
Allow from all
</FilesMatch>
DirectoryIndex app.php
# Inhoud van directories niet tonen.
Options -Indexes
# Volg symbolic links in deze directory.
Options +FollowSymLinks
# Alle 404 errors afhandelen door WM
ErrorDocument 404 /web/app.php
# Forceer eenvoudige foutmelding voor requests naar niet bestaande favicon.ico
<Files favicon.ico>
ErrorDocument 404 "Het opgevraagde bestand favicon.ico werd niet gevonden."
</Files>
<IfModule mod_rewrite.c>
RewriteEngine On
# Voorkomt toegang tot "verborgen" directories (beginnen met een punt).
RewriteRule "(^|/)\." - [F]
# Domein normaliseren, trailing . verwijderen
RewriteCond %{HTTP_HOST} (.*)\.$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [L,R=301]
# Stuurt alle requests door naar domein met 'www.' prefix. Dus:
# http://webstores.nl/... wordt doorgestuurd naar http://www.webstores.nl/...
# Subdomeinen worden uiteraard niet voorzien van 'www.'.
RewriteCond %{HTTP_HOST} !^www\.[a-z0-9-]+\.[a-z]{2,6}$ [NC]
RewriteCond %{HTTP_HOST} ^([a-z0-9-]+\.[a-z]{2,6})$ [NC]
RewriteRule ^(.*)$ http://www.%1/$1 [L,R=301]
# alle requests afhandelen in de web directory
RewriteRule ^$ web/ [L]
RewriteRule (.*) web/$1 [L]
</IfModule>