create subdomain with cpanel - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: create subdomain with cpanel (/showthread.php?tid=40981) |
create subdomain with cpanel - El Forum - 04-25-2011 [eluser]runrun[/eluser] Hi, today I went to Cpanel to create a subdomain, http://blog.mysite.com is the subdomain. When I enter the url into the browser, it keeps redirecting me to http://mysite.com/blog. does this have anything to do with codeigniter or my htaccess file? If you wonder what I put in the htaccess, I do 2 things, remove the index.php. And rewrite links to http://www.mysite.com instead of http://mysite.com create subdomain with cpanel - El Forum - 04-26-2011 [eluser]toopay[/eluser] Can you show your working htaccess here? I want to see how its look like... create subdomain with cpanel - El Forum - 04-26-2011 [eluser]runrun[/eluser] Code: <IfModule mod_rewrite.c> create subdomain with cpanel - El Forum - 04-26-2011 [eluser]toopay[/eluser] have you try to exclude 'blog' folder within your htaccess? Code: # RewriteCond $1 !^(index\.php|images|robots\.txt|css) create subdomain with cpanel - El Forum - 04-26-2011 [eluser]runrun[/eluser] I remove the entire code in htaccess, now subdomain behave normally. But I need a rule to automatically add www to the address, so I added Code: Options +FollowSymlinks it works, but when I added rule to remove index.php, the site behave weirdly, it has no css, below is the problem code Code: Options +FollowSymlinks create subdomain with cpanel - El Forum - 04-26-2011 [eluser]toopay[/eluser] should add this line Code: RewriteCond %{REQUEST_FILENAME} !-f create subdomain with cpanel - El Forum - 04-26-2011 [eluser]runrun[/eluser] great! |