Advertisement
Guest User

HTAC

a guest
Sep 18th, 2012
855
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.44 KB | None | 0 0
  1. # Rewrite www to non-www
  2. RewriteCond %{HTTP_HOST} ^www\.example\.nl$ [NC]
  3. RewriteRule ^(.*)$ http://example.nl/$1 [R=301,L]
  4.  
  5. # Rewrite-rules Magento
  6. RewriteCond %{REQUEST_FILENAME} !-f
  7. RewriteCond %{REQUEST_FILENAME} !-d
  8. RewriteRule ^/webshop/(?!media/)(?!skin/)(?!js/).*$ /webshop/index.php [L,QSA,NC]
  9.  
  10. # Rewrite-rules Joomla
  11. RewriteCond %{REQUEST_FILENAME} !-f
  12. RewriteCond %{REQUEST_FILENAME} !-d
  13. RewriteRule ^/.*$ /index.php [L,QSA]
  14.  
  15. <IfModule mod_php5.c>
  16.  
  17. ############################################
  18. ## adjust memory limit
  19.  
  20. # php_value memory_limit 64M
  21. php_value memory_limit 256M
  22. php_value max_execution_time 18000
  23.  
  24. ############################################
  25. ## disable magic quotes for php request vars
  26.  
  27. php_flag magic_quotes_gpc off
  28.  
  29. ############################################
  30. ## disable automatic session start
  31. ## before autoload was initialized
  32.  
  33. php_flag session.auto_start off
  34.  
  35. ############################################
  36. ## enable resulting html compression
  37.  
  38. #php_flag zlib.output_compression on
  39.  
  40. ###########################################
  41. # disable user agent verification to not break multiple image upload
  42.  
  43. php_flag suhosin.session.cryptua off
  44.  
  45. ###########################################
  46. # turn off compatibility with PHP4 when dealing with objects
  47.  
  48. php_flag zend.ze1_compatibility_mode Off
  49.  
  50. </IfModule>
  51.  
  52. <IfModule mod_security.c>
  53. ###########################################
  54. # disable POST processing to not break multiple image upload
  55.  
  56. SecFilterEngine Off
  57. SecFilterScanPOST Off
  58. </IfModule>
  59.  
  60. <IfModule mod_deflate.c>
  61.  
  62. ############################################
  63. ## enable apache served files compression
  64. ## http://developer.yahoo.com/performance/rules.html#gzip
  65.  
  66. # Insert filter on all content
  67. ###SetOutputFilter DEFLATE
  68. # Insert filter on selected content types only
  69. #AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript
  70.  
  71. # Netscape 4.x has some problems...
  72. #BrowserMatch ^Mozilla/4 gzip-only-text/html
  73.  
  74. # Netscape 4.06-4.08 have some more problems
  75. #BrowserMatch ^Mozilla/4\.0[678] no-gzip
  76.  
  77. # MSIE masquerades as Netscape, but it is fine
  78. #BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
  79.  
  80. # Don't compress images
  81. #SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
  82.  
  83. # Make sure proxies don't deliver the wrong content
  84. #Header append Vary User-Agent env=!dont-vary
  85.  
  86. </IfModule>
  87.  
  88. <IfModule mod_ssl.c>
  89.  
  90. ############################################
  91. ## make HTTPS env vars available for CGI mode
  92.  
  93. SSLOptions StdEnvVars
  94.  
  95. </IfModule>
  96.  
  97. <IfModule mod_rewrite.c>
  98.  
  99. ############################################
  100. ## enable rewrites
  101.  
  102. Options +FollowSymLinks
  103. RewriteEngine on
  104.  
  105. ############################################
  106. ## you can put here your magento root folder
  107. ## path relative to web root
  108.  
  109. #RewriteBase /webshop/
  110.  
  111. ############################################
  112. ## uncomment next line to enable light API calls processing
  113.  
  114. # RewriteRule ^api/([a-z][0-9a-z_]+)/?$ api.php?type=$1 [QSA,L]
  115.  
  116. ############################################
  117. ## rewrite API2 calls to api.php (by now it is REST only)
  118.  
  119. RewriteRule ^api/rest api.php?type=rest [QSA,L]
  120.  
  121. ############################################
  122. ## workaround for HTTP authorization
  123. ## in CGI environment
  124.  
  125. RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  126.  
  127. ############################################
  128. ## TRACE and TRACK HTTP methods disabled to prevent XSS attacks
  129.  
  130. RewriteCond %{REQUEST_METHOD} ^TRAC[EK]
  131. RewriteRule .* - [L,R=405]
  132.  
  133. ############################################
  134. ## redirect for mobile user agents
  135.  
  136. #RewriteCond %{REQUEST_URI} !^/mobiledirectoryhere/.*$
  137. #RewriteCond %{HTTP_USER_AGENT} "android|blackberry|ipad|iphone|ipod|iemobile|opera mobile|palmos|webos|googlebot-mobile" [NC]
  138. #RewriteRule ^(.*)$ /mobiledirectoryhere/ [L,R=302]
  139.  
  140. ############################################
  141. ## always send 404 on missing files in these folders
  142.  
  143. RewriteCond %{REQUEST_URI} !^/(media|skin|js)/
  144.  
  145. ############################################
  146. ## never rewrite for existing files, directories and links
  147.  
  148. RewriteCond %{REQUEST_FILENAME} !-f
  149. RewriteCond %{REQUEST_FILENAME} !-d
  150. RewriteCond %{REQUEST_FILENAME} !-l
  151.  
  152. ############################################
  153. ## rewrite everything else to index.php
  154.  
  155. RewriteRule .* index.php [L]
  156.  
  157. </IfModule>
  158.  
  159.  
  160. ############################################
  161. ## Prevent character encoding issues from server overrides
  162. ## If you still have problems, use the second line instead
  163.  
  164. AddDefaultCharset Off
  165. #AddDefaultCharset UTF-8
  166.  
  167. <IfModule mod_expires.c>
  168.  
  169. ############################################
  170. ## Add default Expires header
  171. ## http://developer.yahoo.com/performance/rules.html#expires
  172.  
  173. ExpiresDefault "access plus 1 year"
  174.  
  175. </IfModule>
  176.  
  177. ############################################
  178. ## By default allow all access
  179.  
  180. Order allow,deny
  181. Allow from all
  182.  
  183. ###########################################
  184. ## Deny access to release notes to prevent disclosure of the installed Magento version
  185.  
  186. <Files RELEASE_NOTES.txt>
  187. order allow,deny
  188. deny from all
  189. </Files>
  190.  
  191. ############################################
  192. ## If running in cluster environment, uncomment this
  193. ## http://developer.yahoo.com/performance/rules.html#etags
  194.  
  195. #FileETag none
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement