hao can i routing subdomain? |
Not from CodeIgniter. You can route only controllers of the domain/subdomain, where your system is installed or from where it is accessed.
Read URI Routing section in the documentation. But maybe with a .htaccess file or by changing the server configuration it could be achievable, but it is just a hypotesis. Tell us, if you will find a solution.
Some things are simpler than they seem ...
Code: // application/config/routes.php
(09-23-2015, 05:00 AM)Narf Wrote: Some things are simpler than they seem ... Wouldn't this only work if your subdomain is pointing to the same root directory as your main domain? (09-23-2015, 05:13 AM)Martin7483 Wrote:(09-23-2015, 05:00 AM)Narf Wrote: Some things are simpler than they seem ... Yes, but how else do you expect to be able to have domain-based routing within CI?
(09-23-2015, 05:19 AM)Narf Wrote:(09-23-2015, 05:13 AM)Martin7483 Wrote:(09-23-2015, 05:00 AM)Narf Wrote: Some things are simpler than they seem ... I was asking because a subdomain by default points to it's own directory in the root of your hosting (09-23-2015, 05:24 AM)Martin7483 Wrote: I was asking because a subdomain by default points to it's own directory in the root of your hosting This depends on your host, and in most cases it can be changed. You could also put a copy of the index.php file in each subdomain and modify each index.php file to point to the same directories for everything else, or you could setup separate application directories for each subdomain but share the system directory. (09-23-2015, 05:00 AM)Narf Wrote: Some things are simpler than they seem ... this is a good one, but some controlller dosn't work |
Welcome Guest, Not a member yet? Register Sign In |