Loading Different controllers

#1
[eluser]Shouvik-S-Mazumdar[/eluser]
Hi ,

I have a website structure like this


controllers/
mydir/
adir/

lets say the user requests

http://www.example.com/somecontroller

i want him to get redirected ( with or without url modification in the browser )

to http://www.example.com/mydir/somecontroller

and if he specifies


http://example.com/adir/somecontroller - it should behave normally meaning he should get what he wanted under adir ( not redirect to mydir since he specified the dir name)


Also, is it possible to virtualize the subdiretory like http://adir.example.com ?

i have been thru the threads for virtual sub domain ..couldnt solve the problem so thot of reasking it here

#2
[eluser]mohsin917[/eluser]
To access the controllers from a specific directory change the application folder in your index.php file at the root

Code:
$application_folder = "application/users";

It will access the the controller from users directory.

http://localhost/ursite/controller_name


and you don't have to use this url

http://localhost/ursite/users/controller_name


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.