Codeigniter Redirect Internal Server Error
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us codeigniter 500 internal server error Learn more about Stack Overflow the company Business Learn more about hiring developers
Internal Server Error In Codeigniter Localhost
or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack
How To Solve 500 Internal Server Error In Codeigniter
Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Codeigniter Internal Server Error on redirect to
Networkerror 500 Internal Server Error In Codeigniter
another page up vote 1 down vote favorite I have the following function which is supposed to redirect to another page on success : public function process() { $username = $this->input->post('username'); $password = $this->input->post('password'); // Validate the user can login $result = $this->login_model->validate($username, $password); // Now we verify the result if (!$result) { if (empty($password)) { $msg = 'Invalid username and/or password.
'; $this->index($msg); } else 500 internal server error codeigniter ajax { $msg = 'Invalid username and/or password.
'; $this->index($msg); } } else { // If user did validate, // Send them to members area redirect('home'); } } If it's valid ,then I should be redirected to the home but unfortunately I get the following error : HTTP ERROR: 500 Internal Server Error RequestURI=http://system.uniqueloo.co.ke/login/process Is there another way I can do a redirect in codeigniter without using the php redirect function? php .htaccess codeigniter redirect share|improve this question asked Nov 20 '15 at 5:32 H Dindi 44821129 Have you check htaccess file? –Arvind Jaiswal Nov 20 '15 at 6:18 add a comment| 1 Answer 1 active oldest votes up vote 0 down vote Make sure index function accepting incoming argument In Controller public function process() { $username = $this->input->post('username'); $password = $this->input->post('password'); $result = $this->login_model->validate($username, $password); if (isset($result)) { #change this if (empty($password)) { $msg = 'Invalid username and/or password.
'; $this->index($msg); # not sure about this } else { $msg = 'Invalid username and/or password.
'; $this->index($msg); # not sure about this } } else { redirect('home'); } } share|improve this answer answered Nov 20 '15 at 5:37 Abdulla Nilam 13.6k102046 add a comment
Me? Password forgot password? This is an archived forum and may no longer be relevant. The active forums are here. Advanced Search .htaccess URL Rewrite Causes 500 Internal Server Error dcawrey Posted: 21 September 2011 03:51 PM Joined: 2011-09-196 posts Hi There: I've been trying to internal server error codeigniter wamp simplify my site's URL structure by creating an .htaccess file with the following code to remove index.php. need to use codeigniter. but, a problem just occur when i start code with https://www.sitepoint.com/community/t/codeigniter-show-welcome-to-nginx-page-when-requset-controller-page/23262 CI (codeigniter). i am usually use, nginx - php - mysql https://gist.github.com/4226750 and i have read CI user_guide properly and i just understand how to use that framework. ok, let's face the problem: I've create a controller just like this: load->model('site_model'); } internal server public function index() { $data['posts'] = $this->Site_model->getPosts(); $data['title'] = 'Index Page!'; // load view $this->load->view('template/header', $data); $this->load->view('post/index', $data); $this->load->view('template/footer'); } public function view($id) { $data['post'] = $this->Site_model->getPosts($id); /* * show 404 page error if the requested ID * is not found in the database. */ if (empty($data['post'])) { show_404(); } $data['title'] = $data['post']['post_title']; // internal server error load the needed view $this->load->view('template/header', $data); $this->load->view('post/view', $data); $this->load->view('template/footer'); } } i think this is very basic CI code, but when try to access this url: http://localhost/cif/post and the server just show welcome to nginx page fyi, http://localhost/cif is my base project and i was set permission both of dir and files properly ScallioXTX 2012-11-08 22:43:27 UTC #2 How is your NGiNX virtual host defined? It should have something like try_files $uri $uri/ /index.php?$query_string; in it somewhere. mildfoam 2012-11-09 03:35:35 UTC #3 ScallioXTX said: How is your NGiNX virtual host defined? It should have something like try_files $uri $uri/ /index.php?$query_string; in it somewhere. this is my nginx config (/etc/nginx/sites-available/default): # You may add here your # statements for each of your virtual hosts to this file ## # You should look at the following URL's in order to grasp a solid understanding # of Nginx configuration files in order to fully unleash the power of Nginx. # http://wiki.nginx.org/Pitfalls # http://wiki.nginx.org/QuickStart # http://wiki.nginx.org/Configura gist now Instantly share code, notes, and snippets. Star 89 Fork 59 philipptempel/.htaccess Created Dec 6, 2012 Embed What would you like to do? Embed Embed this gist in your website. Embed Share Copy sharable URL for this gist. Share Clone via HTTPS Clone with Git or checkout with SVN using the repository's web address. HTTPS Learn more about clone URLs Download ZIP Code Revisions 1 Stars 89 Forks 59 CI: Simple .htaccess using mod_rewrite for CodeIgniter Raw .htaccess