Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

htaccess

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