Dear all,
I am very new to the Yii framework and I want to create my first website with it.
A user can register on my website and create a user name. After the registration process he should be able to access his own page(with custom css) with the url:
www.username.domain.com
or
www.domain.com/username
where "username" stands for his username he inserted in the user registration form.
where user login with this url and access own dashboard !!!
Thank you very much for your help!
konapaz
(Konapaz)
September 25, 2013, 10:28am
2
Dear all,
I am very new to the Yii framework and I want to create my first website with it.
A user can register on my website and create a user name. After the registration process he should be able to access his own page(with custom css) with the url:
www.username.domain.com
or
www.domain.com/username
where "username" stands for his username he inserted in the user registration form.
where user login with this url and access own dashboard !!!
Thank you very much for your help!
Hi
First make it by controller/action
www.domain.com/index.php?r=user/index&uname=theusername
where action
public function actionIndex($uname) {
$user = UserModel::model()->findByAttributes('username'=>$uname);
if ($user){
//everything that you want
}
}
after of that see
http://www.yiiframework.com/doc/blog/1.1/en/final.url
to make
www.domain.com/index.php?r=user/index&uname=theusername => www.domain.com/username
0 down vote favorite
1
Basically i need to create a virtual sub domain for each and every user based on username in YII.
user login with own url like :
www.example.com is my main site
after create new test user it should be login with to
test.example.com
till he/she logout the url must be test.example.com
i use this functionality on localhost with creating virtual host.
please help to resolve this problem
Thanks in advance.
konapaz
(Konapaz)
September 25, 2013, 1:31pm
4
0 down vote favorite
1
Basically i need to create a virtual sub domain for each and every user based on username in YII.
user login with own url like :
www.example.com is my main site
after create new test user it should be login with to
test.example.com
till he/she logout the url must be test.example.com
i use this functionality on localhost with creating virtual host.
please help to resolve this problem
Thanks in advance.
The first is different from the second one.
check these links
php, subdomain
php, dns