Ver Mensaje Individual
  #3 (permalink)  
Antiguo 20/09/2011, 11:35
devilboy9999
 
Fecha de Ingreso: octubre-2009
Mensajes: 125
Antigüedad: 14 años, 6 meses
Puntos: 2
[Solucionado] Error 404 en CodeIgniter-Ayudaaa

Cita:
Iniciado por GatorV Ver Mensaje
Suena a que tienes el modulo ModRewrite deshabilitado, ¿haz verificado eso?
probé con esto:


http://localhost/code/index.php/hola/prueba

y me muestra el mensaje de la funcion prueba


creo ya todo funciona bien, la unica duda que me queda es si existe alguna manera de omitir el index.php.

que en vez de

http://localhost/code/index.php/hola/prueba

me funcione con:

http://localhost/code/hola/prueba


Edito: investigué como hacer eso y la solucion es crear un .htaccess con esto

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ ci/index.php/$1 [L]

y reemplazar

$config['index_page'] = 'index.php';

por

$config['index_page'] = '';

pero ahora me tira este error :


Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, oscar and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
Apache/2.2.4 (Win32) PHP/5.2.1 Server at localhost Port 80


bueno encontré la solución por si alguien le sirve


se cre un archivo .htaccess en la raiz de nuestra carpeta, en mi caso code

con este codigo

Código:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /code/index.php/$1 [L]
solo deben reemplezar la ruta con su carpeta raiz

no me funcionaba por ke lo tenia asi:
/ci/index.php/

cuando mi carpeta raiz es:

/code/index.php/

bueno espero le sirva a alguien mas esta info

Última edición por devilboy9999; 20/09/2011 a las 11:59 Razón: Solucionado