#Безопасность#
Header set Content-Security-Policy "connect-src 'self' https://*.yandex.ru https://fonts.googleapis.com https://*.gstatic.com; script-src 'self' 'unsafe-eval' 'unsafe-inline' blob: https://*.yandex.ru https://*.cloudflare.com https://gist.github.com; img-src 'self' blob: data: https://*.yandex.ru https://counter.yadro.ru https://*.gstatic.com https://chart.apis.google.com https://picsum.photos https://*.picsum.photos https://*.cloudflare.com"
Header set X-XSS-Protection "1; mode=block"
Header set X-Content-Type-Options "nosniff"
#Кодировка#
AddDefaultCharset utf-8
php_value register_globals on
php_flag display_errors 7
php_value error_reporting 7
#Временная зона#
php_value date.timezone Europe/Moscow
#Директория#
DirectoryIndex index.php
Options -Indexes
RewriteEngine On
#Главное зеркало#
RewriteCond %{HTTP_HOST} ^www\.goload\.tk$ [NC]
RewriteRule ^(.*)$ https://goload.tk/$1 [R=301,L]
#Разделы#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^lang/([a-z]*)?$ modules/lang.php?lang=$1 [L,QSA]
RewriteRule ^theme/?$ modules/theme.php [L,QSA]
RewriteRule ^cover/file([0-9]*)/?$ assets/img/cover/index.php?id=$1 [L,QSA]
RewriteRule ^file/?$ index.php?act=file [L,QSA]
RewriteRule ^file/([0-9]*)/?$ index.php?act=file&id=$1&selection=$1 [L,QSA]
RewriteRule ^file/last/?$ index.php?act=file&id=$1&selection=top [L,QSA]
RewriteRule ^file([0-9]*)/?$ index.php?act=files&id=$1 [L,QSA]
RewriteRule ^up([0-9]*)/?$ index.php?act=up&id=$1 [L,QSA]
RewriteRule ^like([0-9]*)/?$ index.php?act=like&id=$1 [L,QSA]
RewriteRule ^delete([0-9]*)/?$ index.php?act=delete&id=$1 [L,QSA]
RewriteRule ^report([0-9]*)/?$ index.php?act=report&id=$1 [L,QSA]
RewriteRule ^report/del([0-9]*)?$ index.php?act=del_report&id=$1 [L,QSA]
RewriteRule ^komm([0-9]*)/?$ index.php?act=komm&id=$1 [L,QSA]
RewriteRule ^komm/del([0-9]*)?$ index.php?act=del_komm&id=$1 [L,QSA]
RewriteRule ^komm([0-9]*)/([0-9]*)/?$ index.php?act=komm&id=$1&selection=$2 [L,QSA]
RewriteRule ^komm([0-9]*)/last/?$ index.php?act=komm&id=$1&selection=top [L,QSA]
RewriteRule ^like_komm([0-9]*)/?$ index.php?act=like_komm&id=$1 [L,QSA]
RewriteRule ^add_file/?$ index.php?act=add_file [L,QSA]
RewriteRule ^rules/?$ index.php?act=rules [L,QSA]
RewriteRule ^ads/?$ index.php?act=ads [L,QSA]
RewriteRule ^search/?$ index.php?act=search [L,QSA]
RewriteRule ^out/?$ index.php?act=out [L,QSA]
RewriteRule ^admin/?$ modules/pages/admin.php [L,QSA]
RewriteRule ^dashboard/?$ index.php?act=dashboard [L,QSA]
RewriteRule ^online/?$ index.php?act=online [L,QSA]
RewriteRule ^users/?$ index.php?act=users [L,QSA]
RewriteRule ^users/([0-9]*)/?$ index.php?act=users&selection=$1 [L,QSA]
RewriteRule ^users/last/?$ index.php?act=users&selection=top [L,QSA]
RewriteRule ^reports/?$ index.php?act=reports [L,QSA]
RewriteRule ^exit/?$ index.php?act=exit [L,QSA]
RewriteRule ^sign_up/?$ index.php?act=sign_up [L,QSA]
RewriteRule ^sign_in/?$ index.php?act=sign_in [L,QSA]
RewriteRule ^vk_auth/?$ index.php?act=vk_auth [L,QSA]
RewriteRule ^profile/?$ index.php?act=profile [L,QSA]
RewriteRule ^profile/([0-9]*)/?$ index.php?act=profile&id=$1&selection=$1 [L,QSA]
RewriteRule ^profile/last/?$ index.php?act=profile&id=$1&selection=top [L,QSA]
RewriteRule ^user/settings/?$ index.php?act=settings [L,QSA]
RewriteRule ^user/photo/?$ index.php?act=photo [L,QSA]
RewriteRule ^user/password/?$ index.php?act=password [L,QSA]
RewriteRule ^logout/?$ index.php?act=logout [L,QSA]
RewriteRule ^offline/?$ index.php?act=offline [L,QSA]
#Страницы ошибок#
ErrorDocument 403 /modules/errors/403.php
ErrorDocument 404 /modules/errors/404.php
ErrorDocument 410 /modules/errors/410.php
ErrorDocument 503 /modules/errors/503.php