Foros del Web » Programando para Internet » PHP » CodeIgniter »

Problema con el index.php

Estas en el tema de Problema con el index.php en el foro de CodeIgniter en Foros del Web. Hola estoy comenzando con Codeigniter y estoy con el problema que todos tenemos cuando queremos comenzar quitarle el mentado /index.php/ de la URL Lo que ...
  #1 (permalink)  
Antiguo 05/03/2013, 17:55
 
Fecha de Ingreso: septiembre-2009
Ubicación: México
Mensajes: 102
Antigüedad: 14 años, 7 meses
Puntos: 4
Pregunta Problema con el index.php

Hola estoy comenzando con Codeigniter y estoy con el problema que todos tenemos cuando queremos comenzar quitarle el mentado /index.php/ de la URL

Lo que he hecho hasta el momento es :

En el archivo config.php
Código PHP:
 $config['index_page'] = ''
En mi archivo httpd.conf
Código PHP:
 LoadModule rewrite_module modules/mod_rewrite.so 
Y el archivo .HTACCESS que estoy utilizando es, el archivo esta ubicado en la carpeta raiz de Codeigniter (junto a controller, models, views, etc, etc)
Código PHP:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase 
/ci

#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$[L]

#When your application folder isn't in the system folder
#This snippet prevents user access to the application folder
#Submitted by: Fabdrol
#Rename 'application' to your applications folder name.
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$[L]

#Checks to see if the user is attempting to access a valid file,
#such as an image or css document, if this isn't true it sends the
#request to index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond 
%{REQUEST_FILENAME} !-d
RewriteRule 
^(.*)$ /index.php?/$[L]
</
IfModule>

<
IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
# Submitted by: ElliotHaughin

ErrorDocument 404 /index.php
</IfModule
El problemas es que cuando quiero cargar mi URL

http://localhost/ci/carpeta/controller

Codeigniter me redirecciona a mi carpeta de localhost

No se que modificarle al HTACCESS o como solucionar el problema porque si utilizo la URL así http://localhost/ci/index.php/carpeta/controller funciona sin problemas


Alguna sugerencia o algún error que le vean a mi código
  #2 (permalink)  
Antiguo 05/03/2013, 22:58
 
Fecha de Ingreso: agosto-2010
Mensajes: 44
Antigüedad: 13 años, 8 meses
Puntos: 2
Respuesta: Problema con el index.php

El directorio base de codeigniter no es el que tu estas diciendo, sino que un nivel mas arriba, donde tienes application, system e index.php, prueba poniendo el htaccess ahí. Saludos

Etiquetas: Ninguno
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 14:23.