Skip to content

Instantly share code, notes, and snippets.

@yesidays
Created March 17, 2012 19:42
Show Gist options
  • Save yesidays/2064699 to your computer and use it in GitHub Desktop.
Save yesidays/2064699 to your computer and use it in GitHub Desktop.
htaccess para eliminar index.php en Codeigniter
RewriteEngine on
RewriteCond $1 !^(index\.php|images|php|script|styles|js|css)
RewriteRule ^(.*)$ /index.php/$1 [L]
@gamunax
Copy link

gamunax commented Jan 30, 2018

Hola, debes agregarlo en la raiz de tu aplicacion.
ejemplo:

  • application
  • system
  • .htaccess -> en la raiz debe ir

@joshua1983
Copy link

Hola, a los que no les funciona aun, recuerden que deben habilitar en el httpd.conf de apache la propiedad AllowOverride a All

@jhonkey
Copy link

jhonkey commented Jun 14, 2018

ERROR falta un (?):

Si el archivo/directorio no existe, redireccionamos

RewriteRule ^(.*)$ /index.php/$1 [L]

CORRECTO:
RewriteRule ^(.*)$ index.php?/$1 [L]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment