Welcome Guest, Not a member yet? Register   Sign In
Slash or No Slash
#1

(This post was last modified: 10-03-2017, 04:46 PM by danallen.)

This question is why is a slash needed at the end of a url on one copy of a CodeIgniter-enabled system but not another copy running on another domain.  The image below is my best effort to provide context for this question.

Full size of the image below at this link.

[Image: slashs.jpg]


This image intends to describe a scenario where two copies 
of a CodeIgniter installation are behaving differently instead of 
behaving the same way.  Specifically, the public server 
requires a slash (/) at the end of a url to reach a particular
controller, while the copy of the system on a private server 
does not require a slash.



The system where this is an issue runs on two domains, one public (https://hollyswritingclasses.com), the other private (mondo.fortress200g.work).  On the public domain, a slash (/) is required at the end of a url to reach a CodeIgniter controller.  The slash is is not required to reach the same controller on the private server.

I noticed the difference troubleshooting, when a link was working on one copy of the system but not the other.  I expected behavior of the two systems to be the same.  On the public server, a slash (/) is needed to reach a controller at affiliates/dashboard.  The slash is not required on the private server.

Parts of the the system are implemented in Code Igniter, other parts are not.  For example, the home page is not in code igniter.

My question is: 
Why is a slash required at the end of a url to reach code igniter on one system but not the other?

phpinfo for the public domain is available at this url.

A copy of phpinfo on the private domain has been copied to a file available at this url.

Any information you can provide will be very much appreciated.  Thank you.

Attached Files Thumbnail(s)
   
Reply
#2

Did you add the slash to the end of both servers CodeIgniter Config base_url ?

If so then it could be the servers are setup different.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

(This post was last modified: 10-05-2017, 07:49 AM by danallen.)

(10-04-2017, 01:47 AM)InsiteFX Wrote: Did you add the slash to the end of both servers CodeIgniter Config base_url ?

If so then it could be the servers are setup different.

Both servers are running $base_url in vanilla form, no changes to how CI is shipped.  That said, on these servers, $base_url has a slash at the end in vanilla Code Igniter.  The image below show the $base_url as it appears on both servers:

   
   

All in all, this looks like the difference behavior has to be caused by the server, not the application.
Reply
#4

(This post was last modified: 10-06-2017, 06:47 AM by InsiteFX. Edit Reason: spelling error )

CodeIgniter versions 3.X need the ./application/config/config.php $config['base_url '] set with the endding slash added

Your showing the ./system/core/config.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB