Welcome Guest, Not a member yet? Register   Sign In
How to do htaccess authenticated controllers/folders?
#4

[eluser]gh0st[/eluser]
Hi there.

It's a shame I can't make a specific folder to do this. There is only the CMS part that requires authentication.

I understand I can dump my CMS controller files into a sub-folder.

In the help file, it says under "Organizing Your Controllers into Sub-folders", but I'm finding that it will not use a default file, unless it is specified.

In the help file it says I can do this:

Quote:Simply create folders within your application/controllers directory and place your controller classes within them.

Note: When using this feature the first segment of your URI must specify the folder. For example, lets say you have a controller located here:
application/controllers/products/shoes.php

To call the above controller your URI will look something like this:
example.com/index.php/products/shoes/show/123

Each of your sub-folders may contain a default controller. Simply name your default controller as specified in your application/config/routes.php file.

But there is no example of how to set up the routes.

I am dumping all the CMS stuff inside a controller folder called 'CMS'.

What is the best way to set a route for:

/cms/

So that it by default goes to:

/cms/cms_home.php (controller file)

Thanks.


EDIT:

I was able to sort out the routing, by doing this:

Code:
/* set in the routes.php file */
/* Custom routes */
$route['cms'] = "cms/cms";


Messages In This Thread
How to do htaccess authenticated controllers/folders? - by El Forum - 08-20-2009, 05:44 AM
How to do htaccess authenticated controllers/folders? - by El Forum - 08-20-2009, 06:15 AM
How to do htaccess authenticated controllers/folders? - by El Forum - 08-20-2009, 06:30 AM
How to do htaccess authenticated controllers/folders? - by El Forum - 08-20-2009, 06:58 AM
How to do htaccess authenticated controllers/folders? - by El Forum - 08-20-2009, 07:06 AM
How to do htaccess authenticated controllers/folders? - by El Forum - 08-20-2009, 07:15 AM
How to do htaccess authenticated controllers/folders? - by El Forum - 08-20-2009, 07:26 AM
How to do htaccess authenticated controllers/folders? - by El Forum - 08-20-2009, 07:29 AM
How to do htaccess authenticated controllers/folders? - by El Forum - 08-21-2009, 04:57 AM
How to do htaccess authenticated controllers/folders? - by El Forum - 08-21-2009, 05:19 AM
How to do htaccess authenticated controllers/folders? - by El Forum - 08-24-2009, 03:36 AM
How to do htaccess authenticated controllers/folders? - by El Forum - 08-24-2009, 07:57 AM
How to do htaccess authenticated controllers/folders? - by El Forum - 09-17-2009, 09:19 AM
How to do htaccess authenticated controllers/folders? - by El Forum - 09-17-2009, 09:34 AM
How to do htaccess authenticated controllers/folders? - by El Forum - 09-17-2009, 09:44 AM
How to do htaccess authenticated controllers/folders? - by El Forum - 09-17-2009, 09:48 AM
How to do htaccess authenticated controllers/folders? - by El Forum - 09-17-2009, 09:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB