Removendo \"index.php\" da url


/ Published in: PHP
Save to your folder(s)

2 etapas: .htaccess e config.php


Copy this code and paste it in your HTML
  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


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.