php - Want to create dynamic subdomain in codeigniter? -


in site want add functionality user use username domain.

like in codeigniter right want give user use own url login in site , other stuff.

for eg:

i want www.username.mysite.com/login or www.username.mysite.com/category

so here user can login credential , add category. have 2 controller in site login , category.

so how routes or .htaccess.

here's explanation of issue here. http://www.joehayes.org/setting-up-wildcard-dns-for-subdomains.html

ok if have read explanation on link, you'd know should redirect of subdomains www first. in httpd.conf file there's virtual host definition containing yourdomain.com redirect requests documentroot.

**serveralias yourdomain.com** serveradmin webmaster@yourdomain.com documentroot /home/yourdoma/public_html byteslog domlogs/yourdomain.com-bytes_log servername www.yourdomain.com user yourdomain group yourdomain customlog /usr/local/apache/domlogs/yourdomain.com combined scriptalias /cgi-bin/ /home/yourdomain/public_html/cgi-bin/ 

and should modify serveralias *.yourdomain.com retrieve subdomains document root folder. should able mod_rewrite or url parse uri succeed this.


Comments