AddDefaultCharset UTF-8RewriteEngine OnDirectoryIndex index.php ## EXPIRES CACHING ### Включаем кэш в браузерах посетителей<ifModule mod_headers.c> # Все html и htm файлы будут храниться в кэше браузера один день <FilesMatch "\.(html|htm)$"> Header set Cache-Control "max-age=43200" </FilesMatch> # Все css, javascript и текстовые файлы будут храниться в кэше браузера одну неделю <FilesMatch "\.(js|txt)$"> Header set Cache-Control "max-age=604800" </FilesMatch> # Все флэш файлы и изображения будут храниться в кэше браузера один месяц <FilesMatch "\.(flv|swf|ico|gif|jpg|jpeg|png|svg)$"> Header set Cache-Control "max-age=2592000" </FilesMatch> # Отключаем кеширование php и других служебных файлов <FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$"> Header unset Cache-Control </FilesMatch></IfModule> <ifModule mod_expires.c> ExpiresActive On #по умолчанию кеш в 5 секунд ExpiresDefault "access plus 5 seconds" # Включаем кэширование изображений и флэш на месяц ExpiresByType image/x-icon "access plus 1 month" ExpiresByType image/jpeg "access plus 4 weeks" ExpiresByType image/png "access plus 30 days" ExpiresByType image/gif "access plus 43829 minutes" ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds" # Включаем кэширование css, javascript и текстовых файлов на одну неделю ExpiresByType text/javascript "access plus 604800 seconds" ExpiresByType application/javascript "access plus 604800 seconds" ExpiresByType application/x-javascript "access plus 604800 seconds" # Включаем кэширование html и htm файлов на один день ExpiresByType text/html "access plus 43200 seconds" # Включаем кэширование xml файлов на десять минут ExpiresByType application/xhtml+xml "access plus 600 seconds"</ifModule> ## EXPIRES CACHING ###Редирект с протокола http на https.#RewriteCond %{HTTPS} offRewriteCond %{HTTP:X-Forwarded-Proto} !httpsRewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]#Редирект с www на без www.#RewriteCond %{HTTP_HOST} ^www.oscore.gaRewriteRule (.*) https://oscore.ga/$1 [R=301,L]#Редирект с index.php#RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/RewriteRule ^index\.php$ https://oscore.ga/ [R=301,L] # НастройкаRewriteRule ^change/password$ modules/settings.php?act=password [L,QSA]# СообщенияRewriteRule ^messages$ modules/messages.php [L,QSA]RewriteRule ^messages/write/([0-9]*)$ modules/messages.php?act=write&id=$1 [L,QSA]RewriteRule ^messages/view/([0-9]*)$ modules/messages.php?act=view&id=$1 [L,QSA]# КомментарииRewriteRule ^comments/delete/([0-9]*)$ modules/comments.php?act=dell&id=$1 [L,QSA]RewriteRule ^edit/comment/([0-9]*)$ modules/comments.php?act=reads&id=$1 [L,QSA]RewriteRule ^comments/reply/([0-9]*)$ modules/comments.php?act=otvet&id=$1 [L,QSA]RewriteRule ^comments/quote/([0-9]*)$ modules/comments.php?act=citat&id=$1 [L,QSA]# АнкетаRewriteRule ^profile/([0-9]*)$ modules/profile.php?id=$1 [L,QSA]RewriteRule ^profile/themf/([0-9]*)$ modules/ank.php?act=themf&id=$1 [L,QSA]RewriteRule ^profile/themk/([0-9]*)$ modules/profile.php?act=themk&id=$1 [L,QSA]RewriteRule ^profile/simpa/([0-9]*)$ modules/profile.php?act=simpa&id=$1 [L,QSA]# АвторизацияRewriteRule ^sign-in$ modules/system.php?act=login [L,QSA]RewriteRule ^sign-up$ modules/system.php?act=registration [L,QSA]RewriteRule ^sign-out$ modules/system.php?act=exit [L,QSA]RewriteRule ^sign-up/referral/([0-9]*)$ modules/system.php?act=reg&ref=$1 [L,QSA]# UPLOADRewriteRule ^upload/avatar$ modules/upload.php?act=avatar [L,QSA]RewriteRule ^upload/file/([0-9]*)$ modules/upload.php?act=file&id=$1 [L,QSA]# БиллингRewriteRule ^billing$ modules/billing.php [L,QSA]RewriteRule ^billing/services$ modules/billing.php?act=services [L,QSA]RewriteRule ^billing/services/grad$ modules/billing.php?act=grad [L,QSA]RewriteRule ^billing/services/podc$ modules/billing.php?act=podc [L,QSA]RewriteRule ^billing/services/username$ m/billing.php?act=editnick [L,QSA]RewriteRule ^billing/send$ modules/billing.php?act=perevod [L,QSA]RewriteRule ^billing/send/([0-9]*)$ m/billing.php?act=perevod&id=$1 [L,QSA]RewriteRule ^billing/send/([0-9]*)/([0-9.]*)$ modules/billing.php?act=perevod&id=$1&summa=$2 [L,QSA]# info RewriteRule ^rules$ modules/faq.php?act=rules [L,QSA]RewriteRule ^onlines$ modules/users.php?act=online [L,QSA]RewriteRule ^users$ modules/users.php?act=list [L,QSA]# КабинетRewriteRule ^office?$ modules/office.php [L,QSA]RewriteRule ^change/avatar$ modules/settings.php?act=avatar [L,QSA]RewriteRule ^profile/edit$ modules/settings.php?act=profile [L,QSA]RewriteRule ^profile/edit/contact$ modules/settings.php?act=contact [L,QSA] RewriteRule ^office/referral$ modules/office.php?act=referral [L,QSA]RewriteRule ^notifications$ modules/office.php?act=lenta [L,QSA]RewriteRule ^office/settings$ modules/office.php?act=sett [L,QSA]# ФорумRewriteRule ^forum$ modules/forum.php [L,QSA]RewriteRule ^forum/add/category$ modules/forum.php?act=add-category [L,QSA]RewriteRule ^forum/([0-9]*)$ modules/forum.php?act=category&id=$1 [L,QSA]RewriteRule ^forum/add/subforum/([0-9]*)$ modules/forum.php?act=add-subforum&id=$1 [L,QSA]RewriteRule ^forum/([A-Za-z0-9-]+)-([0-9]*)$ modules/forum.php?act=subforum&id=$2 [L,QSA]RewriteRule ^forum/create/([0-9]*)$ modules/forum.php?act=create-topic&id=$1 [L,QSA]RewriteRule ^topic/([A-Za-z0-9-]+)-([^/]+)-([0-9]*)?$ modules/forum.php?act=topic&id=$3 [L,QSA]# jsRewriteRule ^to/likes$ system/ajax/like.php [L,QSA]RewriteRule ^to/delete-file$ system/ajax/delete-file.php [L,QSA]RewriteRule ^to/podpsus$ system/ajax/podpsus.php [L,QSA]RewriteRule ^to/add-bookmarks$ system/ajax/add-bookmarks.php [L,QSA]RewriteRule ^to/sortkomm$ system/ajax/sortkomm.php [L,QSA]RewriteRule ^to/office/redkont$ system/ajax/office.php?act=redkont [L,QSA] ErrorDocument 400 /modules/error.php?code=400ErrorDocument 401 /modules/error.php?code=401ErrorDocument 403 /modules/error.php?code=403ErrorDocument 404 /modules/error.php?code=404ErrorDocument 500 /modules/error.php?code=500
« Mavzuga qaytish