1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/Roosso-RooCMS

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
В этом репозитории не указан файл с открытой лицензией (LICENSE). При использовании обратитесь к конкретному описанию проекта и его зависимостям в коде.
Клонировать/Скачать
.htaccess 14 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
alex Roosso Отправлено 17.04.2019 01:36 292f21f
Options All -ExecCGI -Indexes -Includes +FollowSymLinks
#Options -MultiViews
# REWRITE ___________________
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
#RewriteCond %{HTTP_HOST} ^roocms
#RewriteRule (.*) http://www.roocms.com/$1 [R=301,L]
#RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
#RewriteRule ^index\.php$ http://www.roocms.com/ [R=301,L]
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule ^(.*)$ index.php [L,QSA]
</IfModule>
# REDIRICT __________________
<IfModule mod_rewrite.c>
# RewriteRule ^page/(.*)$ ?page=$1 [QSA,NE,L]
# RewriteRule ^(([^/]+/)*[^.]+)$ /index.php?page=$1 [QSA,NE,L]
# RewriteRule ^basket(.*)$ ?page=demo$1 [QSA,NE,L]
# RewriteRule ^(([^/]+/)*[^.]+)/$ /index.php?page=$1 [L]
# RewriteRule ^(([^/]+/)*[^.]+)$ /index.php?page=$1 [L]
# RewriteRule ^news/([^/\.]+)/?$ news.php?news=$1 [L]
# RewriteRule ^(.*\.((js)|(css)))$ plugin/GzipFile.php?file=$1
# RewriteRule \.css$ plugin/GzipFile.php?file=$1
# RewriteRule \.js$ plugin/GzipFile.php?file=$1
</IfModule>
# Маска
# RedirectMatch 301 /blog(.*) http://www.roocms.com/$1
# Без маски
# Redirect 301 /index.html /index.php
# Если страница удалена, сообщим поисковику.
# Redirect 410 /index.html
# SECURE ____________________
<IfModule mod_ssl.c>
# SSLOptions +StrictRequire
# SSLRequireSSL
# SSLRequire %{HTTP_HOST} eq "roocms.com"
</IfModule>
<IfModule mod_rewrite.c>
# RewriteCond %{HTTPS} !on
# RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
# RewriteCond %{SERVER_PORT} !^443
# RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# Внимание!
# Данная конфигурация файла может порождать побочные запросы к индексному файлу вашего сайта
# в случаях когда в вашей верстке или скриптах содержаться ошибки или ссылки на несуществующие файлы или папки.
# Подобные обращения в большом числе могут вызвать нагрузку на ваш веб сервер. 1 ошибка = 1 лишнему обращению.
# Будьте внимательны. Перед использованием данного файла проверьте файлы access.log и error.log сгенерированные вашим Apache сервером.
# Если вы обнуружите ошибки в ваших скриптах, исправьте их перед использованием на "боевом сервере"
# Блокировать любой запрос, пытающийся испортить base64_encode через URL
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Блокировать любой запрос, содержащий тег <script> в URL
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Блокировать любой запрос, содержащий тег <iframe> в URL
RewriteCond %{QUERY_STRING} (<|%3C).*iframe.*(>|%3E) [NC,OR]
# Блокировать любой запрос, содержащий jacascript в URL
RewriteCond %{QUERY_STRING} (javascript:).*(;).* [NC]
# Блокировать любой запрос, содержащий попытку инъекции БД в URL
RewriteCond %{QUERY_STRING} (;|'|"|%22).*(union|select|insert|drop|update|md5|benchmark|or|and|if).* [NC]
# Блокировать любой запрос, пытающийся установить значение глобальных переменных PHP через URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Блокировать любой запрос, пытающийся изменить _REQUEST переменную через URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Перенаправлять заблокированные запросы
# RewriteRule .* index.php [F]
# и запрошенный путь не соответствует пути к физическому файлу
RewriteCond %{REQUEST_FILENAME} !-f
# и запрошенный путь не соответствует пути к физической папке
RewriteCond %{REQUEST_FILENAME} !-d
# то перенаправить запрос на скрипт index.php
RewriteRule .* index.php [L]
RedirectMatch 301 regexp /index.php?page=e410
</IfModule>
# HOTLINKING ________________
<IfModule mod_rewrite.c>
# RewriteCond %{HTTP_REFERER} !^$
# RewriteCond %{HTTP_REFERER} !^http://([ -a-z0-9] \.)?roocms\.com [NC]
# RewriteRule \.(gif|jpe?g|png)$ - [F,NC,L]
</IfModule>
# INDEX FILE ________________
DirectoryIndex index.php
# HANDLER ___________________
<IfModule mod_mime.c>
AddHandler application/x-httpd-php .html
AddHandler cgi-script .pl .py .jsp .asp .htm .shtml .sh .cgi
AddType application/x-javascript .js
AddType application/json .json
AddType text/css .css
AddType text/xml .xml
# Audio
AddType audio/ogg .oga .ogg
AddType audio/mp4 .m4a .f4a .f4b
# Video
AddType video/ogg .ogv
AddType video/mp4 .mp4 .m4v .f4v .f4p
AddType video/webm .webm
AddType video/x-flv .flv
# SVG
AddType image/svg+xml .svg .svgz
AddEncoding gzip .svgz
# Webfonts
AddType application/vnd.ms-fontobject .eot
AddType application/x-font-ttf .ttf .ttc
AddType font/opentype .otf
AddType application/x-font-woff .woff
# Assorted types
AddType image/x-icon .ico
AddType image/webp .webp
AddType text/cache-manifest .appcache .manifest
AddType text/x-component .htc
AddType application/xml rss atom xml .rdf
AddType application/x-chrome-extension .crx
AddType application/x-opera-extension .oex
AddType application/x-xpinstall .xpi
AddType application/octet-stream .safariextz
AddType application/x-web-app-manifest+json .webapp
AddType text/x-vcard .vcf
AddType application/x-shockwave-flash .swf
AddType text/vtt .vtt
# AddType application/octet-stream .doc .mov .avi .pdf .xls .rar .zip .mp3 .wmv .ppt .tar .gz .docx .xlsx
# ForceType application/x-httpd-php
</IfModule>
# GZIP ______________________
<IfModule mod_gzip.c>
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text\.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_include mime ^application/x-font-woff.*
mod_gzip_item_exclude mime ^image\.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</IfModule>
<ifModule mod_deflate.c>
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
AddOutputFilterByType DEFLATE application/x-font-woff
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE font/opentype
AddOutputFilterByType DEFLATE font/otf
AddOutputFilterByType DEFLATE font/ttf
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/x-icon
AddOutputFilterByType DEFLATE image/jpg
AddOutputFilterByType DEFLATE image/jpeg
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
</ifModule>
# PHP _______________________
php_value upload_max_filesize 64M
php_value post_max_size 64M
php_value default_charset utf-8
php_flag magic_quotes_gpc Off
php_flag register_globals Off
php_flag short_open_tag On
# php_value sendmail_from root@roocms.com
# php_value max_input_time 200
# php_value session.name sid
php_value error_reporting 0
php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off
php_flag log_errors off
php_flag ignore_repeated_errors on
php_flag ignore_repeated_source on
# php_value log_errors_max_len 1024
php_flag report_memleaks off
php_flag track_errors off
php_value docref_root 0
php_value docref_ext 0
# php_value arg_separator.input &
# php_value arg_separator.output &
# php_value error_log /tmp/php_error.log
# php_value error_prepend_string " "
# php_value error_append_string " "
# php_value auto_prepend_file prepend.php
# php_value auto_append_file append.php
# php_value user_agent “Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)”
# With Apache 2.4 the "Order, Deny" syntax has been deprecated and moved from
# module mod_authz_host to a new module called mod_access_compat (which may be
# disabled) and a new "Require" syntax has been introduced to mod_authz_host.
<IfModule mod_version.c>
<IfVersion < 2.4>
<Files "php_error.log">
Order Allow,Deny
Deny from All
Satisfy All
</Files>
</IfVersion>
<IfVersion >= 2.4>
<Files "php_error.log">
Require all denied
</Files>
</IfVersion>
</IfModule>
<IfModule !mod_version.c>
<IfModule !mod_authz_core.c>
<Files "php_error.log">
Order Allow,Deny
Deny from All
Satisfy All
</Files>
</IfModule>
<IfModule mod_authz_core.c>
<Files "php_error.log">
Require all denied
</Files>
</IfModule>
</IfModule>
<IfModule php5_module>
# php_value session.cookie_httponly true
</IfModule>
# XDEBUG ___________________
#php_flag xdebug.profiler_enable On
#php_flag xdebug.extended_info On
#php_flag xdebug.remote_enable off
#php_flag xdebug.auto_trace off
# OTHER SETTINGS ____________
<IfModule mod_setenvif.c>
SetEnv TZ Europe/Moscow
</IfModule>
ServerSignature Off
AddDefaultCharset UTF-8
AddCharset utf-8 .atom .css .js .json .rss .vtt .xml
# CACHE AND Headers _________
<IfModule mod_headers.c>
#кэшировать html и htm файлы на один день
<FilesMatch "\.(html|htm)$">
Header set Cache-Control "max-age=43200"
</FilesMatch>
#кэшировать css, javascript и текстовые файлы на одну неделю
<FilesMatch "\.(js|css|txt)$">
Header set Cache-Control "max-age=604800"
</FilesMatch>
#кэшировать флэш и изображения на месяц
<FilesMatch "\.(flv|swf|ico|gif|jpg|jpeg|png|jpe?g)$">
Header set Cache-Control "max-age=2592000"
</FilesMatch>
#отключить кэширование
<FilesMatch "\.(pl|php|cgi|spl|scgi|fcgi)$">
#Header unset Cache-Control
</FilesMatch>
<FilesMatch "\.(ttf|ttc|otf|eot|woff|font.css)$">
#Header set Access-Control-Allow-Origin "*"
</FilesMatch>
<FilesMatch "\.(js|css|gif|png|jpe?g|pdf|xml|oga|ogg|m4a|ogv|mp4|m4v|webm|svg|svgz|eot|ttf|otf|woff|ico|webp|appcache|manifest|htc|crx|oex|xpi|safariextz|vcf)$" >
#Header unset X-UA-Compatible
</FilesMatch>
</IfModule>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 5 seconds"
ExpiresByType image/x-icon "access plus 2592000 seconds"
ExpiresByType image/jpeg "access plus 2592000 seconds"
ExpiresByType image/png "access plus 2592000 seconds"
ExpiresByType image/gif "access plus 2592000 seconds"
ExpiresByType video/ogg "access plus 1 month"
ExpiresByType audio/ogg "access plus 1 month"
ExpiresByType video/mp4 "access plus 1 month"
ExpiresByType video/webm "access plus 1 month"
ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
ExpiresByType text/css "access plus 604800 seconds"
ExpiresByType text/javascript "access plus 604800 seconds"
ExpiresByType application/javascript "access plus 604800 seconds"
ExpiresByType application/x-javascript "access plus 604800 seconds"
ExpiresByType text/html "access plus 43200 seconds"
ExpiresByType application/xhtml+xml "access plus 600 seconds"
ExpiresByType text/xml "access plus 600 seconds"
ExpiresByType application/xml "access plus 600 seconds"
ExpiresByType application/json "access plus 600 seconds"
ExpiresByType application/rss+xml "access plus 1 hour"
ExpiresByType application/atom+xml "access plus 1 hour"
ExpiresByType text/x-component "access plus 1 week"
ExpiresByType application/x-font-ttf "access plus 1 month"
ExpiresByType font/opentype "access plus 1 month"
ExpiresByType application/x-font-woff "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
</IfModule>
# Block directory
#<LocationMatch "cache$">
# <Files *>
# Order Allow,Deny
# Deny from All
# </Files>
#</LocationMatch>
#<Location "/server-status">
# SetHandler server-status
# Require host example.com
#</Location>
# Bad Rquest
ErrorDocument 400 /index.php?page=e400
# Authorization Required
ErrorDocument 401 /index.php?page=e401
# Forbidden
ErrorDocument 403 /index.php?page=e403
# Not found
ErrorDocument 404 /index.php?page=e404
# Method Not Allowed
ErrorDocument 405 /index.php?page=e405
# Request Timed Out
ErrorDocument 408 /index.php?page=e408
# Conflict
ErrorDocument 409 /index.php?page=e409
# Request URI Too Long
ErrorDocument 414 /index.php?page=e414
# Internal Server Erro
ErrorDocument 500 /sod/500.html
# Not Implemented
ErrorDocument 501 /sod/501.html
# Bad Gateway
ErrorDocument 502 /sod/502.html
# Service Unavailable
ErrorDocument 503 /sod/503.html
# Gateway Timeout
ErrorDocument 504 /sod/504.html

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/Roosso-RooCMS.git
git@api.gitlife.ru:oschina-mirror/Roosso-RooCMS.git
oschina-mirror
Roosso-RooCMS
Roosso-RooCMS
master