Posted By

joaobarbosa on 10/31/10


Tagged

apache codeigniter


Versions (?)

Removendo "index.php" da url


 / Published in: PHP
 

2 etapas: .htaccess e config.php

  1. /*
  2.  
  3. No arquivo .htaccess, colocar (ou substituir caso ja exista) as linhas abaixo
  4.  
  5. RewriteEngine on
  6. RewriteCond $1 !^(index\.php|resources|robots\.txt)
  7. RewriteCond %{REQUEST_FILENAME} !-f
  8. RewriteCond %{REQUEST_FILENAME} !-d
  9. RewriteRule ^(.*)$ index.php/$1 [L,QSA]
  10.  
  11. E no arquivo config.php, fazer a seguinte altera���§���£o:
  12.  
  13. */
  14.  
  15. $config['index_page'] = "";

Report this snippet  

You need to login to post a comment.