68KB URLs

By default, URLs in 68KB 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, 68KB uses a segment-based approach:

example.com/article/my_article

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:

example.com/class/function/ID
  1. The first segment represents the controller class that should be invoked.
  2. The second segment represents the class function, or method, that should be called.
  3. The third, and any additional segments, represent the ID and any variables that will be passed to the controller.

Removing the index.php file

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

example.com/index.php/article/my_article

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:

RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]

In the above example, any HTTP request other than those for index.php, images, and robots.txt is treated as a request for your index.php file.

Here is another method that may work if the above doesn't:

Options +FollowSymLinks
Options -Indexes
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|images|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]

Adding a URL Suffix

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

example.com/index.php/article/my_article

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

example.com/index.php/article/my_article.html