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
.htaccess redirect has no effect on route #29
Comments
Could you give some additional info on the problem and how to reproduce it? Do you have some test case for it, or usecase? |
Here is test example on REQUEST_URI problem It's should only need to check after regions for theme just stands for 'theme.php/', but REQUEST_URI not response to .htaccess redirect so it still searching for 'theme/regions'. A example on PHP_SELF PHP_SELF response to .htaccess redirect and no need for mess up routes... |
I guess you did that change and made it work for you. In that case all is well. However, it looks a bit odd, the rewritepart. I think I would have written it like this: This would be the way I would expect it to work. Its a bit tricky to extract the route part, and there are a few things to deal with to make it right. I am aware of at least one condition where the current extraction does not work as intended (related to rewrite on virtual hosts - not using htaccess). You might be right about PHP_SELF, but I would need to do a more detailed investigation before I would know and actually get into the code to change it. I found a good explanation on how PHP_SELF and REQUEST_URI gets populated. |
I change now to |
Anax use REQUEST URI to extract route, REQUEST URI stays the same even after .htaccess has redirect, PHP SELF is better for it takes effect by the .htaccess redirect.
Replace
$requestUri = $this->getServer('REQUEST_URI');
With:
$requestUri = $this->getServer('PHP_SELF');
At line 120 in src\Request\CRequestBasic.php
The text was updated successfully, but these errors were encountered: