-
-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
route_to issue #198
Comments
Which version of CI4 are you using? I think most of this path issues like that should be fixed in 4.0+ |
i use the latest ci4 |
I had the same issue, but I am not 100% sure what caused it. I am also not using Myth/Auth directly - I am writing something in PHP for the first time in 10 years, so I am using it to learn CI more than simply for auth stuff. Anyway, here's what I wrote: $current = (string)uri_string();
// to match route_to's broken relativeness
if ( substr( $current, 0, 1 ) !== '/' )
$current = '/' . $current;
if ( in_array( $current, [ route_to( 'login' ) ] ) ) { ... A lot depends on how you would like to treat PATH part of url. originally used method, that uses
finally |
I believe this was caused by an issue CI was having at the time that should have been fixed in 4.0.4. Closing. |
When baseURL is like www.example.com/folder/public/
I get to many redirects. I inspected it and it turns out in LoginFilter.php route_to returns ('/login') but $current is equal to ('/folder/public/login') and it loops forever.
What would be the most elegant way to solve this? Keep in mind I need to be able to have multiple applications installed (www.example.com/project1/public/, www.example.com/project2/public/).
The text was updated successfully, but these errors were encountered: