form_open() - URL Redirect Error |
03-21-2019, 01:51 PM
(This post was last modified: 03-22-2019, 03:00 AM by SunMeiTzu. Edit Reason: Solved Issue )
Helloo, I was following the Tutorial off the main CodeIgniter page and when I tried to submit the form, I was directed to this URL:
http://localhost/index.php/news/localhos...ews/create. I have some PHP experience and tried a few things to get the result I wanted, but nothing worked. If anyone can offer a suggestion it would be greatly appreciated. I want to leave my original question in case anyone else comes across the same issue. I decided to check through the system files and didn't find the answer so I went back to the applications/config folder and opened config.php and set the $config['base_url'] = 'localhost'; to $config['base_url'] = '/'; . I am not sure if localhost was preset or if I set it, but I now get the result I am looking for.
SunMeiTzu
Linux driven To Succeed!
I am guessing you are serving from Apache, with the document root being your project folder?
It sounds like mod_rewrite is not enabled.
Thanks for your suggestion, but as it turns out I decided to check through the system files and didn't find the answer so I went back to the applications/config folder and opened config.php and set the $config['base_url'] = 'localhost'; to $config['base_url'] = '/'; . I am not sure if localhost was preset or if I set it, but I now get the result I am looking for.
SunMeiTzu
Linux driven To Succeed! |
Welcome Guest, Not a member yet? Register Sign In |