Welcome Guest, Not a member yet? Register   Sign In
URI routing
#1

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.
Reply
#2

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/"
Reply
#3

(This post was last modified: 07-20-2015, 02:58 PM by skunkbad.)

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';

$application_folder = './codeigniter/application';

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.
Reply
#4

Thanks alot to you all.I will endeavor to apply that.Again thanks and bye
Reply




Theme © iAndrew 2016 - Forum software by © MyBB