revIgniter URLs

By default, URLs in revIgniter are designed to be search-engine and human friendly. Rather than using the standard "query string" approach to URLs that is synonymous with dynamic systems, revIgniter uses a segment-based approach:

Note: Query string URLs can be optionally enabled, as described below.

URI Segments

The segments in the URL, in following with the Model-View-Controller approach, usually represent:
  1. The first segment represents the controller script that should be invoked.
  2. The second segment represents the controller handler, that should be called.
  3. The third, and any additional segments, represent any variables that will be passed to the controller.
    These segments are not, as one might think, bound to specific parameters of any handlers.

 The URI Library and the urlHelper contain handlers that make it easy to work with your URI data. In addition, your URLs can be remapped using the URI Routing feature for more flexibility.

Removing the file

By default, the file will be included in your URLs:

You can easily remove this file by using a .htaccess file with some simple rules. Here is an example of such a file, using the "negative" method in which everything is redirected except the specified items:

<IfModule mod_rewrite.c>
  RewriteEngine on
  RewriteBase /
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond $1 !^(index\.lc|image|img|assets|robots\.txt|css|js)
  RewriteRule ^(.*)$$1 [L]

In the above example, any HTTP request other than those for, images, assets, robots.txt, css and js is treated as a request for your file. If you use this method to remove the page, set the Index File variable in your application/config/ file so that it is blank.

If your default controller is not loaded when the URI contains no data please read about URIs in your application/config/ file and choose another protocol to retrieve the URI string.

Note: Adapt RewriteBase to the path to revIgniter. Typically this is /. If you place revIgniter into a subfolder, RewriteBase would be something like /yourSubfolder/yourOtherSubfolder/.

Note: To enable the rewrite engine for .htaccess files you need to set "RewriteEngine On" and "Options FollowSymLinks" must be enabled in the Apache server configuration (httpd.conf) file. See

Adding a URL Suffix

In your application/config/ file you can specify a suffix that will be added to all URLs generated by revIgniter. For example, if a URL is this:

You can optionally add a suffix, like .html, making the page appear to be of a certain type:

Enabling Query Strings

In some cases you might prefer to use query strings URLs:

revIgniter optionally supports this capability, which can be enabled in your application/config/ file. If you open your config file you'll see these items:

put FALSE into gConfig["enableQueryStrings"]
put  "c" into gConfig["controllerTrigger"]
put "h" into gConfig["handlerTrigger"]

If you change "enableQueryStrings" to TRUE this feature will become active. Your controllers and handlers will then be accessible using the "trigger" words you've set to invoke your controllers and handlers:

Using Secure URLs (https) Along with Normal URLs (http)

In case you use secure URLs along with normal URLs you need to set the "Base Site URL" in your application/config/ file to empty like:

put "" into gConfig["baseUrl"]

If gConfig["baseUrl"] is empty revIgniter will guess the protocol, domain and path to your installation.