Welcome Guest, Not a member yet? Register   Sign In
Trailing Forward Slash Added to some routes
#3

I figured this out in the end.

Those routes happen to have actual directories in the public folder which store images used.

It turns out the default behaviour of Apache is to automatically add the trailing slash where an actual directory exists.

It took a while to realise this was the issue as I had dismissed it being an Apache issue as I had stripped everything away in the htaccess file except the Ci4 index.php rewrite.

Turns out I just needed to add the following to the htaccess to stop the behaviour.

DirectorySlash Off

Oh well at least my code got a bit of a tidy up in the wasted time trying to find the issue.
Reply


Messages In This Thread
RE: Trailing Forward Slash Added to some routes - by ltarrant - 11-29-2023, 12:46 AM



Theme © iAndrew 2016 - Forum software by © MyBB