URI routing |
Hello everyone
I am building a project and decided to put the index.php file, application and system folders of CI in a folder codeIgniter which is itself placed at the root (ie www). The base_url is thus: http://mydomain.com/codeIgniter/. I wish to inquire if it is possible for me to route the url such that the word codeIgniter is not in the url at all? That is to say that my home page will be seen through the url: http://mydomain.com/ and out pages seen through say http://mydomain.com/about etc. If so how can I do that? I appreciate your help.
create a virtual host that uses /www/codeigniter as the document_root. Then you can name it whatever you want, like "http://name-of-project.dev/"
If you look in your index.php you will see two variables, $system_path and $application_folder. You can simply set them like this:
Code: $system_path = './codeigniter/system'; But you would need to put index.php in the same dir as /codeigniter/. If you must have the index.php file in /codeigniter/, then do it the way CroNiX suggests. The problem with doing that is that all of your JS, CSS, and all other files would need to be in /codeigniter/ too. |
Welcome Guest, Not a member yet? Register Sign In |