Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 6th, 2012  |  syntax: None  |  size: 2.12 KB  |  hits: 12  |  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. htaccess Can't open files uploaded on server
  2. http://test.entreplus.com/content/plugins/post_audio/uploadify-local/uploads/Mac.(Miller)!%20-%20Jerry's%20Record%20Store.mp3
  3.        
  4. Options +Indexes +FollowSymlinks
  5. RewriteEngine on
  6.  
  7. ## Redirect www.example.com to example.com. Add ## if you don't need the redirect.
  8. RewriteCond %{HTTP_HOST} ^www.(.*)$ [NC]
  9. RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
  10.  
  11. AddType application/x-shockwave-flash swf
  12.  
  13. # BEGIN EXPIRES
  14. #cache html and htm files for one day
  15. <FilesMatch ".(html|htm)$">
  16. Header set Cache-Control "max-age=43200"
  17. </FilesMatch>
  18.  
  19. #cache css, javascript and text files for one week
  20. <FilesMatch ".(js|css|txt)$">
  21. Header set Cache-Control "max-age=604800"
  22. </FilesMatch>
  23.  
  24. #cache flash and images for one month
  25. <FilesMatch ".(flv|swf|ico|gif|jpg|jpeg|png)$">
  26. Header set Cache-Control "max-age=2592000"
  27. </FilesMatch>
  28.  
  29. #disable cache for script files
  30. <FilesMatch ".(pl|php|cgi|spl|scgi|fcgi)$">
  31. Header unset Cache-Control
  32. </FilesMatch>
  33. # END EXPIRES
  34.  
  35. <IfModule mod_gzip.c>  
  36.     mod_gzip_on Yes  
  37.     mod_gzip_dechunk Yes  
  38.     mod_gzip_item_include file .(html?|txt|css|js|php|pl)$  
  39.     mod_gzip_item_include handler ^cgi-script$  
  40.     mod_gzip_item_include mime ^text.*  
  41.     mod_gzip_item_include mime ^application/x-javascript.*  
  42.     mod_gzip_item_exclude mime ^image.*  
  43.     mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*  
  44. </IfModule>
  45.  
  46. ##### CORE ADMIN #####
  47. RewriteRule ^admin/?$ admin_index.php [L]
  48. RewriteRule ^admin/([a-zA-Z0-9_-]+)/?$ admin_index.php?page=$1 [L]
  49. RewriteRule ^admin/plugin_settings/plugin/([a-zA-Z0-9_-]+)/?$ admin_index.php?page=plugin_settings&plugin=$1 [L]
  50.  
  51. ##### GENERIC RULES #####
  52. RewriteRule .(css|php|png|jpg|gif|ico|js|inc|txt|gz|xml|html)$ - [NC,L]
  53. RewriteRule ^([^/]*)/?$ index.php?page=$1 [L]
  54. RewriteRule ^([^/]*)/([^/]*)/?$ index.php?$1=$2 [L]
  55. RewriteRule ^([^/]*)/([^/]*)/([^/]*)/?$ index.php?page=$1&$2=$3 [L]
  56. RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)/?$ index.php?$1=$2&$3=$4 [L]
  57. RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/?$ index.php?page=$1&$2=$3&$4=$5 [L]
  58. RewriteRule ^([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/?$ index.php?$1=$2&$3=$4&$5=$6 [L]