Welcome Guest, Not a member yet? Register   Sign In
Unsetting URI segments in CI instance
#2

(This post was last modified: 05-31-2024, 04:08 PM by kenjis.)

Frankly, unsetting URI segments is not good idea.
I don't get why the legacy code did such dirty hack.
You can define a route for the URIs with active credential.
You should remove the change if you can.

You cannot unset URI segments in CI4.
If you really want to do the legacy code way, you should customize the creation of URI (SiteURI) instance. https://github.com/codeigniter4/CodeIgni...#L795-L809
You get the active credential before creating the URI instance and create the URI instance without the active credential,
instead of creating URI instance with the active credential and unset a segment after that.
Reply


Messages In This Thread
RE: Unsetting URI segments in CI instance - by kenjis - 05-31-2024, 04:05 PM



Theme © iAndrew 2016 - Forum software by © MyBB