Open elvetemedve opened 12 years ago
Here is a quick and dirty solution (if using setUrlSegment). Put this in Request.php at the getUrlPath() function:
if (null !== $this->urlSegment) { $i = $this->urlSegment; while ($i>0) { $urlPath=substr($urlPath, strpos($urlPath, '/', 1)); $i--; } }
right before the $this->setUrlPath(urldecode($urlPath));
But remember, this is just a quick solution, not a good one.
If you use Request::setUrlKeyword or Request::setUrlSegment without Request::enableRestfulMapping, than Request::getUrlPath will return the full URI strarting from webroot instead of the expected suffix.
Request:
Expected result:
Actual result: