jpenguin
(Panupatc)
May 27, 2011, 3:21am
1
I want to make a page that only does 1 thing - receive values from the URL and render out the view according to this value. For example, with mod rewrite, my url would look like this
site.com/some/thing
Can yii put "some" into $var1 and "thing" into $var2 instead of trying to call controller/model?
Why not just use
$_SERVER['REQUEST_URI']
You could also extend CUrlManager to provide your own functionality.
phtamas
(Phtamas)
May 27, 2011, 3:00pm
3
jpenguin:
I want to make a page that only does 1 thing - receive values from the URL and render out the view according to this value. For example, with mod rewrite, my url would look like this
site.com/some/thing
Can yii put "some" into $var1 and "thing" into $var2 instead of trying to call controller/model?
All you need is a rule like the following in urlManager config:
'<var1>/<var2>' => 'site/index',