views:

56

answers:

1

Hello there I'm trying to make my url's as user friendly as possible...so far I have managed to remove index.php (with .htaccess) and I have set $route['default_controller'] = "myController"; so my home page's url is pretty decent as it appears like localhost/myController but all the other url's have the structure localhost/myRoot/myController/function is there a way to make my url's more user friendly?

EDIT: I would like my structure to be like: localhost/myController/myFunction

my file structure is like that:

xampp 
     htdocs
        myRoot
           application
             controllers
                myController.php
A: 

You can set up your routes to be whatever you like http://codeigniter.com/user_guide/general/routing.html

Paul
Thanks for the answer...I edited my question can you suggest a solution with an example?
rabidmachine9
What is the structure of your site? Is it localhost then a folder and then your index?
Paul
I gave a description of my structure, maybe I shouldn't have included xampp and htdocs but that's more or less it...hope that helps, thanks in advance!
rabidmachine9
Can you give an example of the URL's you would like and how they correspond to your controllers and functions? Then we can suggest how to set up your routing.
captaintokyo
I think there is enough info upthere...my current url's have the structure : localhost/myRootFolder/myController/function and I would like it to become localhost/myControler/function
rabidmachine9
So...your CodeIgniter install is located in "myRootFolder"? If so, how do you expect CI's routes to come into play when you only type in "localhost"?
treeface
The smallest the link can be is localhost/myRoot/myController. The localhost/root would be replaced by whatever your domain is. As treeface said, the routing won't work. You could move everything out of the folder so it's all just in localhost or maybe move your index file and change the path to your system and application folders though I'm not sure if that would work..
Paul
Clear enough.. I thought the root had to be removed manually from the path...I didn't know the domain name would replace it...
rabidmachine9