We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
8.0
4.1.9 develop
Manual (zip or tar.gz)
Windows
apache
No response
https://codeigniter4.github.io/CodeIgniter4/incoming/routing.html#limit-to-subdomains You can restrict it to any subdomain by setting the value to an asterisk, (*). If you are viewing from a URL that does not have any subdomain present, this will not be matched:
// Limit to any sub-domain $routes->add('from', 'to', ['subdomain' => '*']); <-not work
$routes->add('from', 'to', ['subdomain' => '*']);
Change in file: https://github.com/codeigniter4/CodeIgniter4/blob/develop/system/Router/RouteCollection.php#L1354
change old: unset($host[count($host)]); to new: unset($host[count($host)-1]);
unset($host[count($host)]);
unset($host[count($host)-1]);
bug fix
The text was updated successfully, but these errors were encountered:
or array_pop($host)
array_pop($host)
and could change line 1358 to : array_pop($host)
Sorry, something went wrong.
@szajens Thank you! This must be a bug.
I sent a PR #5961.
Successfully merging a pull request may close this issue.
PHP Version
8.0
CodeIgniter4 Version
4.1.9 develop
CodeIgniter4 Installation Method
Manual (zip or tar.gz)
Which operating systems have you tested for this bug?
Windows
Which server did you use?
apache
Database
No response
What happened?
// Limit to any sub-domain
$routes->add('from', 'to', ['subdomain' => '*']);
<-not workSteps to Reproduce
Change in file: https://github.com/codeigniter4/CodeIgniter4/blob/develop/system/Router/RouteCollection.php#L1354
change old:
unset($host[count($host)]);
to new:
unset($host[count($host)-1]);
Expected Output
bug fix
Anything else?
No response
The text was updated successfully, but these errors were encountered: