[eluser]icebergdelphi[/eluser]
Hi all, I have some problem with my new proyect using CI ver 2.1.2, I want to use a clear Url access with no index.php/....
OS:WindowsXP
xampp-win32-1.7.7-VC9
Problem:
The problem is when i click in my Login project page, the browser rise:,checkloging 404 not found
checklogin is a controller to check if the user validations,but the .htacess not redirect to my checklogin file.
But if i do the next:
http:localhost/Vilab/index.php/checklogin
everything works fine.
NOTE:
I've been finished, another project with the same config, and i have not problem.
The next configs, i've used in another project, and this runs with no problem:
I have configured all this things:
1.-I created a .htaccess file inside my root folder proyect:C:/xammp/htdocs/ViLab
Note:ViLab is the Name of my CI Folder, i've renamed to ViLab
Code:
<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteBase /ViLab
#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/$1 [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
#This last condition enables access to the images and css folders, and the robots.txt file
#Submitted by Michael Radlmaier (mradlmaier)
RewriteCond $1 !^(index\.php|images|robots\.txt|css)
RewriteRule ^(.*)$ index.php/$1 [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>
2.- I overwrite the next line in config folder:
Code:
$config['index_page'] = '';
3.- In Apache httpd.conf, i have:LoadModule rewrite_module modules/mod_rewrite.so
Code:
#LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule setenvif_module modules/mod_setenvif.so
#LoadModule speling_module modules/mod_speling.so
4.-My route.php config:
Code:
$route['default_controller'] = "login";
The Problem:
I just run my web app and this shows me my login page, 'til here everythings is ok, this is my login page code:
Code:
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Login extends CI_Controller {
function __construct()
{
parent::__construct();
$this->load->helper('url');
}
function index()
{
$this->load->helper('form');
$this->load->view('login_view');
}
}
?>
and my Login_view code, with a <?php echo form_open('checklogin'); ?> to call my controller:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Acceso al Sistema de Laboratorios de Analisis Clinicos</title>
<link rel="stylesheet" type="text/css" href="<?=base_url()?>resources/css/login-box.css"/>
</head>
<body>
<body background="<?=base_url()?>resources/image/bg4.jpg" >
<div>
<div id="login-box">
<H2>Acceso</H2>
<?php echo validation_errors(); ?>
<?php echo form_open('checklogin'); ?>
<br />
<br />
<div id="login-box-name">Usuario:</div><div id="login-box-field">input name="Nick" class="form-login" title="Usuario" value="" size="30" maxlength="2048" /></div>
<div id="login-box-name">Password:</div><div id="login-box-field"><input name="Password" type="password" class="form-login" title="Password" value="" size="30" maxlength="2048" /></div>
<p class="submit">
<input type="submit" name="login-boton" id="login-boton" tabindex="100" value='' />
<input type="hidden" name="testcookie" value="1" />
</p>
<br />
<br />
<br />
</div>
</div>
</body>
</html>
So what is the problem, in my other project works so fine , but in my new project, rise error 404.
Thanks to all, i hope you can help me.