emprit

htaccess

Nov 9th, 2012
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. <IfModule mod_rewrite.c>
  2. RewriteEngine On
  3. RewriteBase /
  4. #Removes access to the system folder by users.
  5. #Additionally this will allow you to create a System.php controller,
  6. #previously this would not have been possible.
  7. #’system’ can be replaced if you have renamed your system folder.
  8. RewriteCond %{REQUEST_URI} ^system.*
  9. RewriteRule ^(.*)$ /index.php?/$1 [L]
  10. #When your application folder isn’t in the system folder
  11. #This snippet prevents user access to the application folder
  12. #Submitted by: Fabdrol
  13. #Rename ‘application’ to your applications folder name.
  14. RewriteCond %{REQUEST_URI} ^application.*
  15. RewriteRule ^(.*)$ /index.php?/$1 [L]
  16. #Checks to see if the user is attempting to access a valid file,
  17. #such as an image or css document, if this isn’t true it sends the
  18. #request to index.php
  19. RewriteCond %{REQUEST_FILENAME} !-f
  20. RewriteCond %{REQUEST_FILENAME} !-d
  21. RewriteRule ^(.*)$ index.php?/$1 [L]
  22. </IfModule>
  23. <IfModule !mod_rewrite.c>
  24. # If we don’t have mod_rewrite installed, all 404&#8242;s
  25. # can be sent to index.php, and everything works as normal.
  26. # Submitted by: emprit
  27. ErrorDocument 404 /index.php
  28. </IfModule>
Advertisement
Add Comment
Please, Sign In to add comment