Advertisement
Guest User

Untitled

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