0

My application have domain as cool_event whereas it's parent domain is coolacharya.com

So when I hit URL as http://coolacharya.com/cool_event/admin_event. After hitting this URL, if login is successful with user_name shruti then the URL should be like http://shruti.coolacharya.com/cool_event/admin_event Or coolacharya.com/shruti.cool_event/admin_event

I don't want to create separate folder for each user.

My .htaccess file is:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php?/$0 [PT,L] 
Donald Duck
  • 8,409
  • 22
  • 75
  • 99
shruti kharge
  • 115
  • 1
  • 2
  • 8

2 Answers2

0
  1. Configure the webserver to process all subdomains to one code base.
  2. Configure the cookies to work across subdomains.
  3. On successful login, make php redirect to your needed subdomain.

Something like that? But you should read more how to proceed with every point.

Anton
  • 1,029
  • 7
  • 19
0

It's easy to create the wildcard subdomains. Check my post for create the wildcard subdomains dynamically in Create subdomains on the fly with .htaccess (PHP) .

Karthikeyan Ganesan
  • 1,901
  • 20
  • 23