Sopsys/NorthBoard/master/.htaccess - Htaccess File

Sopsys/NorthBoard/master/.htaccess

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

On Github License

Files

Download PDF of Htaccess file
HTTP_HOST, HTTP_REFERER, HTTPS, REQUEST_URI

Comments

Apache