0

On my dev server i have the next url

http://someUrl.com/index.php/home//index

and work fine, see the double slashes before method call.

on my production server the same url throws 404 error. Somebody can help me with this problem? some configuration on server mising ?

I using codeigniter 2.x for my project and apache2

4
  • is mod_rewrite enabled on your live machine?
    – castis
    Jun 29, 2015 at 15:11
  • Check your rewriting rules, they might be slightly different between the systems.
    – arkascha
    Jun 29, 2015 at 15:13
  • No, i never use on dev server mod_rewrite to change url
    – marianis
    Jun 29, 2015 at 15:15
  • @marianis You have to be performing some rewrite rule unless you happen to have a directory called index.php with a subdirectory of home and a file named index.
    – Mike Brant
    Jun 29, 2015 at 15:57

2 Answers 2

0

There is no need to put index function that you have at the end of the url

http://www.someurl.com/index.php/home/

You may have to set your routes.

http://www.codeigniter.com/userguide2/general/routing.html

You may need to have the controller class and file names like Home.php and class name Home

0

Check that your live web server has AllowOverride enabled for the web root.

It is possible that you are using .htaccess files to configure mod_rewrite like in this example.

Sample fix:

<Directory /var/www/webroot>
    AllowOverride All
</Directory>

Where /var/www/webroot is the directory that contains your project.

1
  • My server has AllowOverride but is set to None in both servers
    – marianis
    Jun 29, 2015 at 15:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.