Another subdomain question |
[eluser]Fatih[/eluser]
Dears, I have searched forum about multiple domain and subdomain names but I couldn't answer of my these problems. I want to use one CI and my subdomain names will be input for my database. Please find an example: Code: http://mytopic.example.com/item/myitem In this url, mytopic is a variable in my database which is pointed out to a theme. When item.php controller get this mytopic variable, item application will be run on this specified theme. How can I solve it?
[eluser]Fatih[/eluser]
I solve my problem with below .htaccess modification and want to share with you. Code: RewriteEngine On If users linked to http://fatigue.exampleyoursite.com, your "user" controller will be run and show about user profile which name is fatigue: http://www.exampleyoursite.com/user/fatigue
[eluser]Jamongkad[/eluser]
[quote author="fatigue" date="1216831126"]I solve my problem with below .htaccess modification and want to share with you. Code: RewriteEngine On If users linked to http://fatigue.exampleyoursite.com, your "user" controller will be run and show about user profile which name is fatigue: http://www.exampleyoursite.com/user/fatigue[/quote] I've been trying to grapple with this problem for the longest time. Did you have to do anything with you DNS server? Or did you do this through .htaccess only?
[eluser]Fatih[/eluser]
Jamongkad, Yes, you must set up wildcard dns for subdomains. You can find some information in this address. Edit: Also you can find a real sample: http://fatigue.codeigniter.gen.tr this url is pointed to http://www.codeigniter.gen.tr/user/show/fatigue |
Welcome Guest, Not a member yet? Register Sign In |