• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
path error

I have just installed codeigniter.  I get to the point where the welcome page is displayed.  My base url is http://www.xyz.com/common/.  When I type http://www.xyz.com/common/ or http://www.xyz.com/common/index.php, I get the welcome screen.  When I type http://www.xyz.com/common/index.php/welcome, I am redirected somewhere else.  What am I doing wrong?  Hope I have provided enough information.


Did you follow the installation instructions ( https://www.codeigniter.com/user_guide/i...index.html )? It might be a simple configuration issue.

(01-30-2018, 10:49 AM)php_rocs Wrote: @joeinatlanta,

Did you follow the installation instructions ( https://www.codeigniter.com/user_guide/i...index.html )?  It might be a simple configuration issue.

Yes, very simple.  the default controller is 'welcome',  my base url is "http://www.xyz.com/common/".  When I enter www.xyz.com/common/ or www.xyz.com/index.php everything works ok.  the problem starts when I put the slash after index.  Theoretically, www.xyz.com/common/ should be the same thing as www.xyz.com/common/index.php/welcome since I have not modified any controllers.  Am I missing something?


What is the value of $route['default_controller'] in routes.php (location: application->config->routes.php)? It should be 'Welcome'.

Where are you directed to by the way? I forgot to ask.

Yes, to your question of default_controller = Welcome. Let me ask the same question from a different perspective. In any configuration the "/" is used to parse folder information. Until faced with this situation, I have never thought what happens when you parse a file "index.php" and supply a "/" as the first argument. I don't know if there is a setting in my configuration that defines how to resolve it. When i execute http://www.xyz/common/index.php everything works as expected. It's when I add the "/" at the end that my site does not know I'm supplying a program and not a folder.

Just to close this thread and hopefully help others in the future. The problem was my internet provider (GODADDY). Not sure what is different in their setup, but I was able to correct the problem by adding a question mark. From http://www.xyz.com/common/index.php/welcome, to http://www.xyz.com/common/index.php?/welcome. Thanks for your help.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.