0
votes

I have a project with codeigniter that works completely fine on the localhost, no errors at all. But after hosting it with Amazon EC2, i keep getting the "404 page not found" error. I have changed AllowOverride to All and I almost sure that my htaccess file is being used because I put jibberish in it and it resulted in an "Internal server error". I would appreciate any help i can get.

2
mod_rewrite is enable on server?urfusion
@urfusion yes it isarthur27
do some random change in your htaccess, if it gives you 500 internal server error then it is working, if not check host file againurfusion
@urfusion i did that already as stated in my description. It gave the error so i think it does work. What else do yo think could be wrong?arthur27

2 Answers

0
votes

For what it's worth, I had a very similar problem with Ubuntu Server 11.10 and LAMP. I had to run the command

sudo a2enmod rewrite

which did the trick for me. Maybe it's the solution for you or some other people coming in here.

And restart the apache after running this command.

0
votes

I was able to fix my issue but i am not really sure what the problem might have been. All I did was re-download a new Codeigniter folder on my localhost and replace most of the folders in my project with the one i downloaded (apart from Application and vendor). I also changed the name of my controller from 'main.php' to 'Main.php'. Thats all i did and now it works. Thank you to those who tried to help.