A typical URL in Nova without mod_rewrite enabled:
Let's look closer at each part of the URL:
http://localhost/nova/index.php- On my development server, I've created a folder called nova for all of the Nova files. As you can see, the index.php file that handles all requests is sitting within that folder's root.
/main- The next part of the URL is the controller that is being requested within Nova. In this example, we are requesting a controller called
Main. Controllers in Nova can be found in
app/controllers. This is the first segment of the URI and can be accessed using the URI library with
/credits- The next part of the URL in this example is the method within the
Maincontroller that we are calling. (A method is simply a function inside of a class.) In this case, we're requesting the
Creditsmethod. This is the second segment of the URI and can be accessed using the URI library with
/1- The number one in this instance doesn't relate to a class or method, but instead, is a parameter held in the URI. Throughout the system, Nova passes parameters through the URI and then access them using CodeIgniter's libraries and helpers. This is the third segment of the URI and would be accessed using the URI library with
$this->uri->segment(3). The URI can contain as many parameters as you want, just keep track of which segment it is.
Log in with your AnodyneID to rate this article or submit the article for review.