From ff845f94cc8876bc6c23c2f55b695bc569038512 Mon Sep 17 00:00:00 2001
From: Derek Jones Consider this URI: In the above example, CodeIgniter would attempt to find a controller named blog.php and load it. Now visit the your site using a URL similar to this: If you did it right, you should see Hello World!. In the above example the function name is index(). The "index" function is always loaded by default if the
second segment of the URI is empty. Another way to show your "Hello World" message would be this: The second segment of the URI determines which function in the controller gets called. Now load the following URL to see the comment function: You should see your new message. For example, lets say you have a URI like this: Your function will be passed URI segments 3 and 4 ("sandals" and "123"): Trying to access it via the URL, like this, will not work:www.your-site.com/index.php/blog/
+example.com/index.php/blog/
www.your-site.com/index.php/blog/
+example.com/index.php/blog/
www.your-site.com/index.php/blog/index/
+example.com/index.php/blog/index/
www.your-site.com/index.php/blog/comments/
+example.com/index.php/blog/comments/
www.your-site.com/index.php/products/shoes/sandals/123
+example.com/index.php/products/shoes/sandals/123
www.your-site.com/index.php/blog/_utility/
+example.com/index.php/blog/_utility/
@@ -305,7 +305,7 @@ located here:
To call the above controller your URI will look something like this:
-www.your-site.com/index.php/products/shoes/show/123
+example.com/index.php/products/shoes/show/123
Each of your sub-folders may contain a default controller which will be called if the URL contains only the sub-folder. Simply name your default controller as specified in your -- cgit v1.2.3-24-g4f1b