Просмотр файла vavok-1.5.3/.htaccess

Размер файла: 6.37Kb
  1. DirectoryIndex index.php index.html
  2.  
  3. AddDefaultCharset UTF-8
  4.  
  5. <Files ~ "include|used">
  6. Order allow,deny
  7. Deny from all
  8. </Files>
  9. <Files ~ "(.dat|.tpl|error_log|.htaccess)$">
  10. Order allow,deny
  11. Deny from all
  12. </Files>
  13.  
  14. #php_flag disable_functions passthru,system,shell_exec,popen
  15. #php_value register_globals Off
  16. #php_value session.use_trans_sid Off
  17. #php_value safe_mode_gid On
  18. #php_value safe_mode_include_dir On
  19. #php_value magic_quotes_gpc Off
  20. #php_value magic_quotes_runtime Off
  21. #php_value magic_quotes_sybase Off
  22. #php_value file_uploads On
  23. #php_value display_errors Off
  24.  
  25. ErrorDocument 400 /pages/error.php?error=400
  26. ErrorDocument 401 /pages/error.php?error=401
  27. ErrorDocument 402 /pages/error.php?error=402
  28. ErrorDocument 403 /pages/error.php?error=403
  29. ErrorDocument 404 /pages/error.php?error=404
  30. ErrorDocument 406 /pages/error.php?error=406
  31. ErrorDocument 500 /pages/error.php?error=500
  32. ErrorDocument 502 /pages/error.php?error=502
  33.  
  34. # ----------------------------------------------------------------------
  35. # Expires headers (for better cache control) (SEO and site performance improvements)
  36. # ----------------------------------------------------------------------
  37. #
  38. # If you don`t use filenames to version, lower the css and js to something like "access plus 1 week"
  39. #
  40. <IfModule mod_expires.c>
  41. ExpiresActive on
  42. # Perhaps better to whitelist expires rules? Perhaps.
  43. # ExpiresDefault "access plus 1 month"
  44. # cache.appcache needs re-requests in FF 3.6 (thx Remy ~Introducing HTML5)
  45. ExpiresByType text/cache-manifest "access plus 0 seconds"
  46. # Your document html
  47. # ExpiresByType text/html "access plus 0 seconds"
  48. # Data
  49. # ExpiresByType text/xml "access plus 0 seconds"
  50. # ExpiresByType application/xml "access plus 0 seconds"
  51. # ExpiresByType application/json "access plus 0 seconds"
  52. # RSS feed
  53. # ExpiresByType application/rss+xml "access plus 1 hour"
  54. # Images
  55. ExpiresByType image/jpeg "access plus 1 year"
  56. ExpiresByType image/gif "access plus 1 year"
  57. ExpiresByType image/png "access plus 1 year"
  58. ExpiresByType image/webp "access plus 1 year"
  59. ExpiresByType image/svg+xml "access plus 1 year"
  60. ExpiresByType image/x-icon "access plus 1 year"
  61.  
  62. # Video
  63. ExpiresByType video/mp4 "access plus 1 year"
  64. ExpiresByType video/mpeg "access plus 1 year"
  65. # HTC files (css3pie)
  66. ExpiresByType text/x-component "access plus 1 month"
  67. # Webfonts
  68. ExpiresByType font/truetype "access plus 1 year"
  69. ExpiresByType font/opentype "access plus 1 year"
  70. ExpiresByType application/x-font-woff "access plus 1 year"
  71. ExpiresByType image/svg+xml "access plus 1 year"
  72. ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
  73. # CSS and JavaScript
  74. ExpiresByType text/css "access plus 1 month"
  75. ExpiresByType application/javascript "access plus 1 month"
  76. ExpiresByType text/javascript "access plus 1 month"
  77. # Force no caching for dynamic files
  78. # <FilesMatch "\.(php)$">
  79. # ExpiresActive Off
  80. # </FilesMatch>
  81.  
  82. <IfModule mod_headers.c>
  83. Header append Cache-Control "public"
  84. </IfModule>
  85. </IfModule>
  86.  
  87. # pagespeed module
  88. <IfModule pagespeed_module>
  89. ModPagespeed off
  90. </IfModule>
  91.  
  92. # commpression mod_deflate
  93. <IfModule mod_deflate.c>
  94. # Compress HTML, CSS, JavaScript, Text, XML and fonts
  95. AddOutputFilterByType DEFLATE application/javascript
  96. AddOutputFilterByType DEFLATE application/rss+xml
  97. AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
  98. AddOutputFilterByType DEFLATE application/x-font
  99. AddOutputFilterByType DEFLATE application/x-font-opentype
  100. AddOutputFilterByType DEFLATE application/x-font-otf
  101. AddOutputFilterByType DEFLATE application/x-font-truetype
  102. AddOutputFilterByType DEFLATE application/x-font-ttf
  103. AddOutputFilterByType DEFLATE application/x-javascript
  104. AddOutputFilterByType DEFLATE application/xhtml+xml
  105. AddOutputFilterByType DEFLATE application/xml
  106. AddOutputFilterByType DEFLATE font/opentype
  107. AddOutputFilterByType DEFLATE font/otf
  108. AddOutputFilterByType DEFLATE font/ttf
  109. AddOutputFilterByType DEFLATE image/svg+xml
  110. AddOutputFilterByType DEFLATE image/x-icon
  111. AddOutputFilterByType DEFLATE text/css
  112. AddOutputFilterByType DEFLATE text/html
  113. AddOutputFilterByType DEFLATE text/javascript
  114. AddOutputFilterByType DEFLATE text/plain
  115. AddOutputFilterByType DEFLATE text/xml
  116.  
  117. # Remove browser bugs (only needed for really old browsers)
  118. BrowserMatch ^Mozilla/4 gzip-only-text/html
  119. BrowserMatch ^Mozilla/4\.0[678] no-gzip
  120. BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
  121. Header append Vary User-Agent
  122. </IfModule>
  123.  
  124. RewriteEngine on
  125. # Include in the next line all folders to exclude
  126. # The [NC] flag here stands for No Case, so you don't have to worry about case sensitivity.
  127. RewriteCond %{REQUEST_URI} !(js|img|fls) [NC]
  128.  
  129. # force https protocol
  130. #RewriteCond %{HTTPS} !=on
  131. #RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
  132.  
  133. # seo friendly home page language url. example.com/en/
  134. # QSA - This rule appends the GET query string which results from the ReWrite rule to the initial GET query string sent by the browser.
  135. RewriteRule ^([a-zA-Z]{2})\b/?$ index.php?ln=$1 [QSA]
  136.  
  137. # deny adding www. or other subdomain to site address
  138. # The [L] flag stands for "Last", meaning that if this condition is true, execute the RewriteRule and do not attempt to match other RewriteConds or perform other operations on the request.
  139. # The [R] flag stands for "Redirect". You can pass in an option to R to set the HTTP status code of the redirect. Example [R=302] or [R=404].
  140. # RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
  141. # RewriteRule ^(.*)$ http://%1%{REQUEST_URI} [R=301,QSA,NC,L]
  142.  
  143. # Redirect to www.
  144. # RewriteCond %{HTTP_HOST} ^[^.]+\.[^.]+$
  145. # RewriteCond %{HTTPS}s ^on(s)|
  146. # RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  147.  
  148. # website pages
  149. RewriteRule ^page\/([^\/]+)\/?$ pages/pages.php?pg=$1 [NC,L]
  150. # end of website pages
  151.  
  152. # website blog pages
  153. RewriteRule ^blog\/$ pages/blog.php
  154. RewriteRule ^blog\/([^\/]+)\/?$ pages/blog.php?pg=$1 [NC,L]
  155. # end of website blog pages
  156.  
  157. # website content - tag search
  158. RewriteRule ^search\/([^\/]+)\/page=([0-9]*)$ search.php?item=$1&page=$2 [NC,L]
  159. RewriteRule ^search\/([^\/]+)\/?$ search.php?item=$1 [NC,L]
  160. RewriteRule ^search$ search.php [NC,L]
  161. # end of website content - tag search
  162.  
  163. # website custom pages
  164. # custom_link - don't remove
  165. # end of website custom pages