problem in redirect method |
[eluser]asmaa kamal[/eluser]
hi i try to code login page to website i got this error Quote:Not Found i got this error if i login by accepted email, password or if i login by unaccepted one this is main code(in controller) Code: <?php and this is view code Code: <?php echo form_open(base_url() . 'main/login')?> and this is model code Code: <?php i think the problem in redirect method ( in main in controller) but when i stop this part i got the same error and when i try this Code: if($this->user_model->Login(array('userEmail'=>$this->input->post('userEmail'),'userPassward'=>$this->input->post('userPassword')))); plz help me thanks ![]()
[eluser]Jason Stanley[/eluser]
What is your base url? Is your site nested in a folder called 't'?
[eluser]asmaa kamal[/eluser]
iam working at "local host" using wamp the folder t is codeigniter folder it contains (application-system-userguide) look at this Code: $config['base_url'] = '';
[eluser]Jason Stanley[/eluser]
Why haven't you filled out the base url? Its Step 3 on the installation instructions. http://ellislab.com/codeigniter/user-gui...index.html This will probably solve your problem. Currently it looks like CI is interpreting your directory as a controller.
[eluser]asmaa kamal[/eluser]
i put it $config['base_url'] = 'wathba.team'or 't' or 'index.php'; but it doesnt solve the problem i dont know what i put in base url i dont have url iam working at localhost sorry iam beginner
[eluser]Jason Stanley[/eluser]
What is the url to your codeigniter install? Quote:http://localhost/t/ Is that it? What are you putting in the browser?
[eluser]asmaa kamal[/eluser]
@jason Stanley when i put :http://localhost/t/index.php/main/login it give me the form password i put email(true )exist in database i got this message : Not Found The requested URL /t/main/login was not found on this server. and the url become :http://localhost/t/main/login if i let textboxes blank and submit >> i got the same message
[eluser]PhilTem[/eluser]
If you're working on wamp and have problems with the mod_rewrite, try to set 'index_page' to 'index.php' than it should solve your problem(s).
[eluser]asmaa kamal[/eluser]
@PhilTem i put $config['index_page'] = 'index.php'; but the problem still exist
[eluser]Jason Stanley[/eluser]
Your redirect code doesn't need the index.php in it. Code: redirect('main/login') You config options should look like this. Code: $config['base_url'] = 'http://localhost/t/'; // The url of your local site. |
Welcome Guest, Not a member yet? Register Sign In |