Rewrite or Pretty URL's


Most of our software (Live Chat PHP Server, Live Chat 3, HelpDesk and CMS) have the option to display pretty URL's. To enable pretty URL's you will need to open your include/db.php file and find:

define('JAK_USE_APACHE', 0);

You will need to change the 0 (zero) to 1 (one).

Before you do that make sure Mod Rewrite (Apache based Server) is available on Nginx you will need to edit the appropriate .conf file.

Apache Server

Please upload following file (.htaccess) located in the htaccess folder when downloaded the package into the root and operator folder of your installation. Important CMS will only need one htaccess file in the root, because the administration panel does not use pretty URL's. Should you not see the .htaccess file your system configuration is set to hide this type of files.

You can also create a .htaccess file with following content:

RewriteEngine ON

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php [L]

ErrorDocument 404 /404/

Nginx

In nginx servers you will need to edit the appropriate .conf file. Following edit needs to be done:

location / {
	index index.php index.html index.htm;
    try_files $uri $uri/ /index.php?$args;
}

For Live Chat 3 and Live Chat PHP Server you will also need a modification for the operator panel:

location /operator/ {
    try_files $uri $uri/ /operator/index.php?$args;
}