This repository was archived by the owner on Jul 4, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.htaccess
More file actions
executable file
·57 lines (46 loc) · 2.17 KB
/
Copy path.htaccess
File metadata and controls
executable file
·57 lines (46 loc) · 2.17 KB
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
AddCharset UTF-8 .js .php
AddDefaultCharset UTF-8
ErrorDocument 404 /404/
ErrorDocument 410 /410/
ErrorDocument 403 /403/
RewriteEngine On
# no-www!
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
RewriteCond %{HTTPS} on
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
# If you want to force HTTPS, use this
#RewriteCond %{HTTPS} off
#RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L]
#Header add Strict-Transport-Security "max-age=604800"
# If you want to redirect links to files to their respective posts, use this
#RewriteCond %{HTTP_REFERER} !^$
#RewriteRule (.*\.)(jpg|jpeg|png|gif|swf|mp3|ogg|flac|psd|tiff|tif|mp4|flv)$ /scripts/file-redirect.php?s=$1$2 [R=301,L]
#---------------------------------------
# Everything below should be left as is.
# Disable MultiViews, it breaks the mod panel
Options -MultiViews
# The rest of the rewrite rules
RewriteRule ^files/([a-zA-Z0-9\_]+)/orig/(.+\.\w+)/(.+\.\w+)$ files/$1/$2/$3 [L]
RewriteRule ^banned/$ banned.php
RewriteRule ^settings/([a-z0-9\_]+)?(/)?([a-z0-9\_]+)?(/)?$ settings.php?do=$1&id=$3
RewriteRule ^search(/)?$ search.php
RewriteRule ^personal/([a-z0-9\_]+)(-[0-9]+)?(/)?$ personal.php?do=$1&page=$2
RewriteRule ^personal/([a-z0-9\_]+)(/)threadlist(/)?$ threadlist_personal.php?do=$1
RewriteRule ^redirect/([0-9]+)(/)?$ scripts/redirect.php?id=$1
RewriteRule ^post/$ scripts/post.php
RewriteRule ^delete/(.*)?$ scripts/delete.php$1
RewriteRule ^410/$ 410.php
RewriteRule ^404/$ 404.php
RewriteRule ^403/$ 403.php
RewriteRule ^mod/([a-z\_]+)(/)?([a-z0-9]+)?(/)?([a-z0-9]+)?(/)?([a-z0-9]+)?$ mod/$1.php?a=$3&b=$5&c=$7
RewriteRule ^singlepost/([0-9]+)(/)?$ singlepost.php?msg=$1
# Blinkenworld is not a board (you can add as many RewriteConds here as you like)
RewriteCond %{REQUEST_URI} !^/blinkenworld
#RewriteCond %{REQUEST_URI} !^/custom_content
RewriteRule ^([a-z0-9\_]+)(-[0-9]+)?(/)?$ board.php?id=$1&page=$2
RewriteRule ^([a-z0-9\_]+)(/)([0-9]+)(-[0-9]+)?(/)?$ thread.php?board=$1&id=$3&page=$4
RewriteRule ^([a-z0-9\_]+)(/)threadlist(/)?$ threadlist.php?id=$1
#RewriteRule ^download/([0-9]+)/([^/]+)$ scripts/download.php?file=$1&fn=$2