![]() |
Don't want users to use this - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Don't want users to use this (/showthread.php?tid=25638) |
Don't want users to use this - El Forum - 12-18-2009 [eluser]Unknown[/eluser] Okay, so I am using codeigniter, and I want to know: Code: class Home extends Controller { I have that code, now, as you can see, I have a class named "Home" If users type "home" in the url, they will see that page, is there anyway I can stop this from happening? I don't want users to type /home, Thanks guys! (Oh wow, new here, and I think I posted in the wrong forum :red:, sorry about that) Don't want users to use this - El Forum - 12-18-2009 [eluser]SpooF[/eluser] What exactly are you trying to do? When do you want that controller to be seen? Don't want users to use this - El Forum - 12-18-2009 [eluser]jedd[/eluser] Hi Invsioncode and welcome to the forums. With these kinds of questions, try to think in terms of what you want to happen, and what actually does happen - in other words, intent, expectation and divergence. You might find something like this answers your question: Code: function index() Don't want users to use this - El Forum - 12-18-2009 [eluser]Unknown[/eluser] I was thinking of a redirect to another page Is that the only way to do it? (what I am getting at is that you could have the same url in twice) www.example.com/home/home if you have a class of home, and an function of index. Because the first /home is the INDEX The second is the CLASS name. Don't want users to use this - El Forum - 12-18-2009 [eluser]jedd[/eluser] List each URL and describe what you want to happen on each one. Don't want users to use this - El Forum - 12-18-2009 [eluser]Craig A Rodway[/eluser] [quote author="Invsioncode" date="1261190984"]If users type "home" in the url, they will see that page, is there anyway I can stop this from happening?[/quote] Delete Home.php? ![]() |