Advertisement
Goddard

Untitled

Sep 23rd, 2013
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. AuthUserFile /var/www/.htpasswd
  2. AuthGroupFile /dev/null
  3. AuthName "Password Protected Area"
  4. AuthType Basic
  5.  
  6. <limit GET POST>
  7. require valid-user
  8. </limit>
  9.  
  10. # Options -Indexes
  11. # Options -Multiviews
  12.  
  13. # Header unset Pragma
  14. # FileETag None
  15. # Header unset ETag
  16.  
  17. # URL Rewrite
  18. <IfModule mod_rewrite.c>
  19. RewriteEngine On
  20.  
  21. #
  22. # Full path to your site
  23. #
  24. RewriteBase /
  25.  
  26. # Rename Photo Names
  27. # RewriteRule ^file/pic/photo/([0-9]+)/([0-9]+)/([A-Za-z0-9]{32}+)\-(.*?)_([0-9]*?)\.(.*)$ file/pic/photo/$1/$2/$3_$5.$6
  28. # RewriteRule ^file/pic/photo/([0-9]+)/([0-9]+)/([A-Za-z0-9]{32}+)\-(.*?)\.(.*)$ file/pic/photo/$1/$2/$3.$5
  29.  
  30. #
  31. # Rules
  32. #
  33. RewriteCond %{REQUEST_FILENAME} !-f
  34. RewriteCond %{REQUEST_FILENAME} !-d
  35. RewriteRule ^(.*) index.php?do=/$1
  36.  
  37. # Image Access Protection
  38. # RewriteRule ^file/pic/photo/(.*)\.(.*)$ static/image.php?file=$1&ext=$2
  39. </IfModule>
  40.  
  41. # Modify Headers
  42. <IfModule mod_headers.c>
  43. # Cache files
  44. <FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf|mp3|mp4)$">
  45. Header set Cache-Control "public"
  46. Header set Expires "Mon, 20 Apr 2015 20:00:00 GMT"
  47. Header unset Last-Modified
  48. </FilesMatch>
  49.  
  50. # Cache JavaScript & CSS
  51. <FilesMatch "\.(js|css)$">
  52. Header set Cache-Control "public"
  53. Header set Expires "Mon, 20 Apr 2015 20:00:00 GMT"
  54. Header unset Last-Modified
  55. </FilesMatch>
  56. </IfModule>
  57.  
  58. # Compress JavaScript & CSS
  59. <IfModule mod_deflate.c>
  60. <FilesMatch "\.(js|css)$">
  61. SetOutputFilter DEFLATE
  62. </FilesMatch>
  63. </IfModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement