Posted By

StevenW721 on 07/09/10


Tagged

htaccess codeigniter


Versions (?)

Who likes this?

7 people have marked this snippet as a favorite

gemmes
jatap
vkolev
ljayz
grablermassive
Gordy
educsis


CodeIgniter Starter .htaccess


 / Published in: Apache
 

  1. ### Turn on Rewrite Engine to remove index.php from URL
  2. <IfModule mod_rewrite.c>
  3. Options +FollowSymLinks
  4. RewriteEngine 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. #Checks to see if the user is attempting to access a valid file,
  15. #such as an image or css document, if this isn't true it sends the
  16. #request to index.php
  17. RewriteCond %{REQUEST_FILENAME} !-f
  18. RewriteCond %{REQUEST_FILENAME} !-d
  19. RewriteRule ^(.*)$ index.php/$1 [L]
  20.  
  21. # Force www. in the domain name.
  22. # RewriteCond %{HTTP_HOST} !^www.dreyervitals.com$
  23. # RewriteRule ^(.*)$ http://www.dreyervitals.com/$1 [R=301]
  24.  
  25. </IfModule>

Report this snippet  

You need to login to post a comment.