Now, let me guess what y'all may be thinking... "It's a bad idea to modify the path info before it's processed. Why would you ever want to do that? This is malicious behavior!!!"
I am trying to get a controller/action
representation of my previous URL; gotten through Yii::app()->getRequest()->getUrlReferrer()
.
From Yii 2 issues, it's possible to set the path info for a new request and parse that request. However, from the Yii 1 source, the only methods which deals with the path info are getPathInfo()
and decodePathInfo()
. If there was a setPathInfo()
, I could have used that and the urlManager->parseUrl()
to achieve this. But we aren't allowed to set the path info.
How can I arrive at a controller/action
representation of my previous URL?