-
Notifications
You must be signed in to change notification settings - Fork 0
/
.htaccess
94 lines (72 loc) · 2.71 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# Kirby .htaccess for Projects by DerZyklop
# Source: https://gist.github.com/DerZyklop/609d1e0245c798ceccec7c7fba660041
# Deflate Compression by MimeType
<IfModule mod_deflate.c>
<FilesMatch "\.(js|jpg|jpeg|gif|png|css)$">
ExpiresActive on
ExpiresDefault "access plus 1 month"
SetOutputFilter DEFLATE
</FilesMatch>
</IfModule>
# rewrite rules
<IfModule mod_rewrite.c>
# enable awesome urls. i.e.:
# http://yourdomain.com/about-us/team
RewriteEngine on
# make sure to set the RewriteBase correctly
# if you are running the site in a subfolder.
# Otherwise links or the entire site will break.
#
# If your homepage is http://yourdomain.com/mysite
# Set the RewriteBase to:
#
# RewriteBase /mysite
#
RewriteBase /
# Redirect to https
RewriteCond %{SERVER_PORT} !^443$
RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=301,L]
# Remove www.
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1%{REQUEST_URI} [R=301,QSA,NC,L]
# Add www.
#RewriteCond %{HTTP_HOST} !^www. [NC]
#RewriteRule ^(.*) http://www.%{HTTP_HOST}/$1 [R=301,L]
# block text files in the content folder from being accessed directly
RewriteRule ^content/(.*)\.(txt|md|mdown)$ error [R=301,L]
# block all files in the site folder from being accessed directly
RewriteRule ^site/(.*) error [R=301,L]
# block all files in the kirby folder from being accessed directly
RewriteRule ^kirby/(.*) error [R=301,L]
# make panel links work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^panel/(.*) panel/index.php [L]
# make site links work
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*) index.php [L]
# 404-Fixes
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_URI} !example.php
#RewriteCond %{REQUEST_URI} !(.*)/$
#RewriteRule ^(.*)$ $1/ [L,R=301]
RewriteRule ^bilder/(.*) photos/$1 [R=301,L]
RewriteRule ^cultofless/(.*) pxwrk/tags/tag:cultofless/$1 [R=301,L]
RewriteRule ^cult-of-less/(.*) pxwrk/tags/tag:cultofless/$1 [R=301,L]
RewriteRule ^cult-of-less/warum-das-ganze/(.*) pxwrk/tags/tag:cultofless/$1 [R=301,L]
RewriteRule ^kontakt/(.*) about/$1 [R=301,L]
RewriteRule ^main/kontakt/(.*) about/$1 [R=301,L]
RewriteRule ^main/musik/(.*) musik/$1 [R=301,L]
RewriteRule ^main/pxwrk/instragram/(.*) snapshots/$1 [R=301,L]
RewriteRule ^main/cult-of-less/(.*) pxwrk/tags/tag:cultofless/$1 [R=301,L]
RewriteRule ^blog/facebook-hat-meinen-account-gesperrt$ blog/facebook-hat-meinen-account-gesperrt-nils-kladderadatsch/ [R=301,L]
# Diese Regel ist super wichtig! Weil früher hieß der Blog "pxwrk"
RewriteRule ^pxwrk/(.*) blog/$1 [R=301,L]
</IfModule>
# Additional recommended values
# Remove comments for those you want to use.
#
# AddDefaultCharset UTF-8
#
# php_flag short_open_tag on