Posted By

Cohenspire on 01/17/10


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

kubaitis


HTaccess


 / Published in: HTML
 

  1. # -- LG .htaccess Generator Start --
  2.  
  3. # .htaccess generated by LG .htaccess Generator v1.0.0
  4. # http://leevigraham.com/cms-customisation/expressionengine/addon/lg-htaccess-generator/
  5.  
  6. # secure .htaccess file
  7. <Files .htaccess>
  8. order allow,deny
  9. deny from all
  10. </Files>
  11.  
  12. # Dont list files in index pages
  13. IndexIgnore *
  14.  
  15. # EE 404 page for missing pages
  16. ErrorDocument 404 /site/fourohfour
  17.  
  18. # Simple 404 for missing files
  19. <FilesMatch "(\.jpe?g|gif|png|bmp)$">
  20. ErrorDocument 404 "File Not Found"
  21. </FilesMatch>
  22.  
  23. RewriteEngine On
  24. RewriteBase /
  25.  
  26. # Add a trailing slash to paths without an extension
  27. RewriteCond %{REQUEST_FILENAME} !-f
  28. RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
  29. RewriteRule ^(.*)$ $1/ [L,R=301]
  30.  
  31. # Remove index.php
  32. # Uses the "include method"
  33. # http://expressionengine.com/wiki/Remove_index.php_From_URLs/#Include_List_Method
  34. RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5})$
  35. RewriteCond %{REQUEST_FILENAME} !-f
  36. RewriteCond %{REQUEST_URI} ^/(site|embeds|home|blog|portfolio|subpages|about|contact|thanks|services|members|P[0-9]{2,8}) [NC]
  37. RewriteRule ^(.*)$ /index.php?/$1 [L]
  38.  
  39. # Remove IE image toolbar
  40. # <FilesMatch "\.(html|htm|php)$">
  41. # Header set imagetoolbar "no"
  42. # </FilesMatch>
  43.  
  44. # -- LG .htaccess Generator End --

Report this snippet  

You need to login to post a comment.