Welcome Guest, Not a member yet? Register   Sign In
how to control URI router ON or OFF?
#1

[eluser]RING[/eluser]
i set router in /app…/config/routes.php
Code:
$route['member(.*)'] = "member$1";
$route['(.*)'] = "home/$1";

my website bind 2 domain-name :
domainA.com
domainB.com

when people visit my website by domainA.com,
i want the router worksSadrouter setting ON)
http://domainA.com/someword ---> class :home , methodConfusedomeword()

and,when people visit my website by domainB.com,
i want the router DO NOT workSadrouter setting OFF)
http://domainB.com/someword ---> class Confusedomeword , method:index()


is it impossible ?
#2

[eluser]TheFuzzy0ne[/eluser]
Yes, that would be possible. You could add some logic to the routes.php file that will only add your routes if the domain matches the one you specify.




Theme © iAndrew 2016 - Forum software by © MyBB