I have codeigniter setup to work on my mac with 10.6 xampp 1.7.3. it seems to work but now cannot find the controller I have created. it gives me a 404 error page not found. I am not using any htaccess files and I have not special features setup. everything is setup like it should be from default settings. the name of my controller is loginpage and have made it the default route in the routes.php file. what should I be looking for?
Thanks.
Proper URL syntax is
http://siteroot/index.php/controller/function/argument
Related
I'm working on a Laravel 5.4 project and it's sandbox environment is this:
http://anything.com/sandbox/abc/www/public
I was asked to change it to:
http://anything.com/sandbox/xyz/www/public
After I change the folder via FTP and try to access the new URL I get this error message:
The requested URL /sandbox/abc/www/public/index.php was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
I tried replacing the base url at the app/config.php and still didn't work.
The website is hosted in a cPanel server.
Any tips on what I should be trying? I just need to change the folder name. That's all.
Thanks for any help!
Answering my question: the problem was that there was a redirection in an .htaccess.
Trying to move the codeigniter project from laptop server to live server. Uploaded the files in Public_HTML and I modified the config.php, base_url, .htaccess as needed and also upgrade the Database... when i run project default controller called correctly when other controller can not call this message show 404 Page Not Found. config.php and .htaccess files update as correct information. This same project run successfully on Local or Desktop server but produce Error on live server 404 Page Not Found home controller (default controller) call but other controller not call.
What is your server? And whats your configuration file?
Make sure you enable mod rewite if you are using apache
a2enmod rewrite
Have you removed index.php from url? Try to access another controller like this.
<domain>/index.php/<controllername>
I created new website using Codeigniter. What puzzled me was when I transferred it to my web server, every page displayed 404 page....
Here's the twist, when I changed my controllers like from home to Home, it will now display correctly.
Can someone tell me why this happened? Is this fine? Do I have to access every pages like example.com/Home or example.com/home?
Thanks.
In Codeigniter version 3 and above, the controller name should start with a capital letter. that's why when you rename your controller from home to Home, it's started working.
The Windows os will treat the file names as case insensitive, but Linus is case sensitive. so this might be the reason it worked in local windows development environment.
My Server's PHP has updated to version 5.3 recently. After this upgrade the drupal which is installed on my site doesn't load the pictures which are located in the '/sites/default/files/' directory. It throws 404 error for every picture stored in this path.
I am pretty confused with this. Do I have to make any change to my .htaccess file?
Is it possible directory permissions were changed when php was upgraded? That would be the simplest explanation, since I'm not aware of a reason why php 5.3 would itself cause this to happen.
I found that there was another .htaccess file in my 'sites/default/files/' folder. My web hosting company has obligated me to remove FollowSymLink. But I didn't know that there was another .htaccess file in my drupal folder. I removed that and now everything is working smoothly.
I am unfortunately getting a blank page when trying to run a site locally. There are other people running it locally just fine, so I am wondering if it could be something to do with my LAMP environment.
When I attempt to load the site, it's nothing but a blank page. I've ran php index.php in console and the error I get is the following "xajax Error: xajax failed to automatically identify your Request URI.Please set the Request URI explicitly when you instantiate the xajax object.". I'm not quite sure how to handle this in CodeIgniter and or at all to be honest.
I think it's a problem with LAMP configuration: check codeigniter folder permissions (add write permission to "logs" folder.
Thanks for your answer. I actually figured out what the problem was, it was like you said a problem with my LAMP configuration. Unfortunately XAMPP (which is what I am using and or was), the newest version uses PHP 5.3. Xajax doesn't support PHP 5.3 and this was causing the problems. After I went to an older version all was well!