Advertisement
jinjie

Untitled

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