url rewriting - yii autoredirect to loginurl with querystring -
i have 1 frontend , 2 backend (admin) in 1 of application.. there 3 url
test.abcd.com ==> frontend part test.abcd.com/admin/user/login ===> main admin test.abcd.com/pro/user/login ===> subadminfor there have created config file like
config/ frontend.php backend.php backend_pro.php
above config run depends on web url. example. if url like.
test.abcd.com
test.abcd.com/?domain= xyz.com
test.abcd.com/?domain= bcd.com
test.abcd.com/?domain= efg.com
fronend config run...
and if url
test.abcd.com/admin/
backend.php run backend
now ........................ said there 2 admin different login page , different access .. 2 include backend_pro.php.. there fixed domain name ..
like if web url contains url like
test.abcd.com/?domain=pro_domain.com or test.abcd.com/?domain=pro_domain1.com
it run backend_pro.php.... , admin redirect test.abcd.com/pro/user/login
first login page..
question ...how can maintain querystring parameters when came from
test.abcd.com/?domain=pro_domain.com or test.abcd.com/?domain=pro_domain1.com
to test.abcd.com/pro/user/login
i want utilize $_get['domain'] in test.abcd.com/pro/user/login
you can see backend_pro.php code here
backend_pro.php
'components' => array( 'user' => array( 'class' => 'application.components.webuser', 'allowautologin' => true, // enable cookie-based authentication 'loginurl' => array('../pro/user/login'), ), 'urlmanager' => array( 'urlformat' => 'path', 'showscriptname' => false, 'rules' => array( 'pro/' => 'user/login', 'pro' => 'site/index', 'pro/admin' => 'site/index', 'pro/payment/*' => 'site/payment', 'pro/site/index/*' => 'site/index', 'pro/<controller:\w+>/' => '<controller>/', 'pro/<controller:\w+>/<id:\d+>' => '<controller>/view', 'pro/<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>', 'pro/<controller:\w+>/<action:\w+>/*/<id:\d+>' => '<controller>/<action>', 'pro/<controller:\w+>/<action:\w+>/*' => '<controller>/<action>', 'pro/<controller:\w+>/<action:\w+>' => '<controller>/<action>', ),
what changed need in above config file
url-rewriting yii
No comments:
Post a Comment