FAQ - Rewrite or Pretty URL's

Rewrite or Pretty URL's

23.11.2016 4176


Most of our software (Cloud Chat 3, Cloud Desk 3, Live Chat 3, HelpDesk 3 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, HelpDesk 3, Cloud Chat 3 and Cloud Desk 3 you will also need a modification for the operator panel:

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

More information how to redirect customer or yourself to the right location can also be found in our blog article - rewrite with apache.