Ver Mensaje Individual
  #21 (permalink)  
Antiguo 06/06/2011, 11:48
nh2006
 
Fecha de Ingreso: diciembre-2006
Mensajes: 213
Antigüedad: 17 años, 4 meses
Puntos: 3
Respuesta: [APORTE] ¿Cómo hacer un login de usuarios en Php y CodeIgniter? Ver script

Bueno amigos,

Siguiendo con las mejoras he querido eliminar el index.php y para ellto tengo las siguientes modificaciones:

Un archivo .htacces:
Código HTML:
Ver original
  1. <IfModule mod_rewrite.c>
  2.     RewriteEngine On
  3.     RewriteBase /
  4.  
  5.     #Removes access to the system folder by users.
  6.     #Additionally this will allow you to create a System.php controller,
  7.     #previously this would not have been possible.
  8.     #'system' can be replaced if you have renamed your system folder.
  9.     RewriteCond %{REQUEST_URI} ^system.*
  10.     RewriteRule ^(.*)$ /casos/index.php?/$1 [L]
  11.    
  12.     #When your application folder isn't in the system folder
  13.     #This snippet prevents user access to the application folder
  14.     #Submitted by: Fabdrol
  15.     #Rename 'application' to your applications folder name.
  16.     RewriteCond %{REQUEST_URI} ^application.*
  17.     RewriteRule ^(.*)$ /casos/index.php?/$1 [L]
  18.  
  19.     #Checks to see if the user is attempting to access a valid file,
  20.     #such as an image or css document, if this isn't true it sends the
  21.     #request to index.php
  22.     RewriteCond %{REQUEST_FILENAME} !-f
  23.     RewriteCond %{REQUEST_FILENAME} !-d
  24.     RewriteRule ^(.*)$ /casos/index.php?/$1 [L]
  25. </IfModule>
  26.  
  27. <IfModule !mod_rewrite.c>
  28.     # If we don't have mod_rewrite installed, all 404's
  29.     # can be sent to index.php, and everything works as normal.
  30.     # Submitted by: ElliotHaughin
  31.  
  32.     ErrorDocument 404 /casos/index.php
  33. </IfModule>

y cambiar $config['index_page'] = 'index.php'; por $config['index_page'] = ''; en el archivo config.php, funciona pero me topo con el problema que el controlador no recibe las variables que so enviadas por Post, es decir $_POST['maillogin'] en el controlador no existe, no llega, creo que el problema viene desde el .htacces pero ya no sé qué cambiar.

Si alguien me puede ayudar se lo voy agradecer mucho.