Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Options -Indexes
- Options +FollowSymLinks
- AddDefaultCharset Off
- #UTF-8
- # Customized error messages.
- ErrorDocument 404 /index.php
- # Set the default handler.
- DirectoryIndex index.php
- # обеспечивающие при необходимости большею безопасность для скриптов php:
- php_value magic_quotes_gpc on
- php_flag register_globals off
- <IfModule mod_rewrite.c>
- RewriteEngine on
- # Rewrite current-style URLs of the form 'index.php?q=x'.
- RewriteBase /
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteCond %{REQUEST_FILENAME} !-d
- RewriteRule ^(.*)$ index.php?page=$1 [QSA,L]
- # RewriteRule ^(site*)/(0,1)$site.php?detail=$1
- # RewriteRule ^(site+)/([a-z]+)/([0-9]+)/({0,1})$site.php?&detail=$1&CategoryID=$2&TypeID=$3
- </IfModule>
- RewriteEngine On
- RewriteBase /
- RewriteRule ^.htaccess$ -[F]
- RewriteRule ^rss.xml$ rss.php
- AddEncoding gzip .gz
- #Усиливаем кеширование
- FileETag MTime Size
- <ifmodule mod_expires.c>
- <filesmatch ".(jpg|gif|png|css|js)$">
- ExpiresActive on
- ExpiresDefault "access plus 10 year"
- </filesmatch>
- </ifmodule>
- #Сжимаем компоненты сайта путем включения Gzip
- AddOutputFilterByType DEFLATE text/html text/plain text/xml application/xml application/xhtml+xml text/javascript text/css application/x-javascript
- BrowserMatch ^Mozilla/4 gzip-only-text/html
- BrowserMatch ^Mozilla/4.0[678] no-gzip
- BrowserMatch bMSIE !no-gzip !gzip-only-text/html
- RewriteCond %{HTTP:Accept-encoding} gzip
- RewriteCond %{HTTP_USER_AGENT} !Konqueror
- RewriteCond %{REQUEST_FILENAME}.gz -f
- RewriteRule ^(.*)\.css$ $1.css.gz [QSA,L]
- <FilesMatch \.css\.gz$>
- ForceType text/css
- </FilesMatch>
- RewriteCond %{HTTP:Accept-encoding} gzip
- RewriteCond %{HTTP_USER_AGENT} !Konqueror
- RewriteCond %{REQUEST_FILENAME}.gz -f
- RewriteRule ^(.*)\.js$ $1.js.gz [QSA,L]
- <FilesMatch \.js\.gz$>
- ForceType application/x-javascript
- </FilesMatch>
- ExpiresActive On
- ExpiresDefault "access plus 10 years"
- <FilesMatch \.(php|phtml|shtml|html|xml)$>
- ExpiresActive Off
- </FilesMatch>
- <FilesMatch \.(php|phtml|shtml|html|xml)$>
- Header append Vary User-Agent
- Header append Cache-Control private
- </FilesMatch>
- <FilesMatch \.(bmp|png|gif|jpeg|ico|flv|wmf|swf|pdf|doc|rtf|css|js)$>
- Header append Cache-Control public
- </FilesMatch>
- <FilesMatch \.(js|css|bmp|png|gif|jpeg|ico|flv|wmf|swf|pdf|doc|rtf)$>
- Header unset Last-Modified
- FileETag MTime
- </FilesMatch>
- ExpiresByType image/jpeg "access plus 333 day"
- ExpiresByType image/gif "access plus 333 day"
- ExpiresByType image/png "access plus 333 day"
- ExpiresByType application/x-javascript "access plus 333 day"
- ExpiresByType text/css "access plus 333 day"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement