Display 404 page in CodeIgniter - codeigniter

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.

Related

Joomla com_users component unable to load some templates

I have modified the users component of Joomla, specifically the file components/com_users/controllers/profile.php and included some custom templates in components/com_users/views/profile/tmpl
It is mostly some forms which I am submitting and then redirecting to specific pages for further actions.
Example scenario :
Above option is accessible to user right after login. I have put it on the profile page by modifying default profile template.
So when someone enters a name, and presses search, then this form is submitted through form
action="<?php echo JRoute::_('index.php?option=com_users&task=profile.selectSendMessage'); ?>"
This in turn calls the function named selectSendMessage which is placed in profile.php file. The function looks like :
As you can see the function redirects to
index.php?option=com_users&view=profile&layout=sendMessage
I have placed sendMessage.php template in com_users/views/profile/tmpl
Everything works fine on localhost which I have set up on MAMP in MacOS
I moved the website to a live server a few days ago. I have followed all proper steps to migrate website and database from localhost to live server. Still any of the custom templates I have put in are never reached.
The strange thin is that Edit User Profile which is redirected to from the same profile.php file from a function edit(), with template in the same location as I have put in edit.php in views/profile/tmpl works as expected.
I am using 1and1 shared hosting plan 1&1 Unlimited for hosting the website.
I have been trying to fix this for quite some time now, but cannot understand the problem. I have tried reinstalling the website several times, tried installing from web apps from 1&1 control panel and modifying it, but no success.
Any tips and insights are welcome. Thank you.
It turns out that 1and1.com hosting somehow doesn't support layout names with a capital letter in it. I changed all layout names to lower case alphabets and everything worked fine like it should.
If someone faces the same issue, this is worth a try. It was particularly hard to debug since you will never suspect that could be a problem. I accidentally stumbled on the solution while playing around.
Thanks.

Magento Front-end "404 Not Found 1"

Situation:
We have a domain name pointing to our old windows server. We purchased a linux server. I wish to build our new webstore on the Linux server. Once I am ready, I will redirect our domain name to the Linux server.
Up to now:
We have Magento installed on the back end. Now I need to have the front-end working
Problem:
I edited the url to be our domain name. I have edited my host file to have the domain name ignore the windows server ip and get directed to the linux server (the one with Magento installed). The page shows up with links and text in a big mess, and the title of the web page says "404 Not Found 1". I get this problem with both the back-end & the front-end.
Thinking:
I am able to access the PHPadmin and edit the url. I tried making the url the Linux server's IP. If I do that, Magento's back-end works but then I get a completely blank page for the front-end. Any suggestion is welcomed.
To make your site visible:
1) Change the links web/unsecure/base_url and web/secure/base_url of the table core_config_data to http://www.yourdomain.com/ or whatever you have.
2) Go to app->etc->local.xml and change your database username,password, host to the right one.
3) if it is still not working go to var and media folders and change the permissions to 777 for all folders and subfolders.If it works you know it is permission problem.
Read this after that and make your decision magento permissions

CSV translation word doesn't work only in a specific server environment

I configured my Magento in es_AR and it works, it translates everithing ok. But happends that one word "Wishlist","Lista de deseos" works in my machine locally, works also ok in one server but in another it dosnt translate. It continues showing "Wishlist". And all the rest of the traductions are ok. So weird. Any guess? Im working with Magento Enterprise versiĆ³n 1.12.0.0. Thanks in advance.
Clear cache and refresh - or translate it in the locale files of Magento: app\locale\es_AR\Mage_Customer.csv
Look for Wishlist there and change it
Maybe you have different Developer Mode sttings (on/off) via your index.php. Maybe you have some DB-Translations differing in the systems.

how to transfer codeigniter site from localhost to live server

I developed a site in codeigniter with basic functionality now i want to update this site to my live server. But when i uploaded my site to live server it shows 404 - PAGE NOT FOUND.
http://www.nawtist.com/test/ams/
Please tell me what do i need to do. I searched a lot about this but i didn't found any helpful information. So is there any base_url or anything else that i need to change before upload this on live server really appreciate
And remember, many servers are case-sensitive and with CodeIgniter v3 you should change the controller's first letter file and model's first letter file to upper case. That worked for me too.
Best
You have problem with your htaccess file or mod_rewrite is disable on that server.
When you go to page with index.php it works (although css file doesn't work because of bad routing)
also check if $config['index_page']=''; if it should work without index.php
I had the same problem times ago and there are 4 points in codeigniter to care about as I remember:
Check base_url value in your "config.php"
Check database settings in "database.php"
Check .htaccess file contents if you have defined it once
Check routes.php if you have defined any custom routes
That's all!
If you are facing 404 page not found in Codeigniter after upload file local to live server then follow these steps
change your controller and file name first letter capital
same change as above in model class and file name i.e first letter capital
After following steps above your problem can be solve Thank you.

404 error after hosting website developed using codeigniter

I am trying to develop an web application that takes google address and stores for future use..
I am a little new to codeIgniter and a little help would be appreciable...
I have developed the application in WAMP 2.0..
It works fine there..But when I upload it to a production server, it displays the index page..but as soon as I try to navigate to other pages from the home page it gives a
404 Page Not Found..
You can always check the site here..
The entire application is working fine in my localhost that is in WAMP..
Thanks in advance
it may be to do with case sensitivity in *nix and windows environments.
this link works:
http://www.poimart.com/index.php/poi/create_user
but this doesn't (404s) (no capital P)
http://www.poimart.com/index.php/Poi/create_user
so any references to your pages within your app should have lower case.
Have you checked if any .htaccess file exists in your document root?

Resources