Overview
This article describes the process to set up SEO-friendly URLs.
By default and sometimes after an upgrade, URLs to locations in your Support Center look like this:
https://my.domainname.com/index.php?/Knowledgebase/List
This URL includes index.php?
, which is necessary for the helpdesk to know where to send the request but is not very attractive to your end-users and it is generally better to have 'clean URLs' listed in search engines.
It is possible to achieve this using functionality called rewrite rules, which are provided by and configured on your web server (rather than Kayako).
Environment
- Applies to Kayako Download
Process
-
Edit your helpdesk __swift/config/config.php file
- Locate the following code in your helpdesk config file, located in
./__swift/config/config.php
:define('SWIFT_BASENAME', 'index.php?');
- Remove
'index.php?'
as value for'SWIFT_BASENAME'
, and save the changes:define('SWIFT_BASENAME', '');
- Locate the following code in your helpdesk config file, located in
-
Configure a rewrite rule in your web server
-
If you use Apache:
- If not already present, create a file called .htaccess in the document root of your helpdesk.
- Paste the following into your .htaccess file:
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond $1 !^(admin|api|console|favicon\.ico|robots\.txt|sitemap\.xml|index\.php|tiny_mce_gzip\.php|cron|onsite|staff|rss|setup|visitor|winapp|wallboard|__swift) [NC] RewriteCond $1 !\.(jpg|jpeg|png|gif|js|css|htm|html)$ [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?/$1 [L] RewriteCond $1 !^(favicon\.ico|robots\.txt|sitemap\.xml|index\.php|tiny_mce_gzip\.php|__swift) [NC] RewriteCond $1 !\.(jpg|jpeg|png|gif|js|css|htm|html)$ [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([a-zA-Z0-9]*)/(.*)$ $1/index.php?/$2 [L] </IfModule>
-
If you use nginx:
- Open your nginx.conf configuration file (this may be located under
/usr/local/nginx/conf/
, but it depends how you have configured your nginx web server). - Add the following location directive (note that this is the location directive we use on our server - this may vary depending on your configuration, especially if you have custom apps installed):
location ~ ^/(admin|api|cron|intranet|rss|setup|staff|visitor|winapp|__swift|__swift/cache|__swift/onsite|onsite|__swift/thirdparty/fusioncharts/Code/FusionCharts|__swift/thirdparty/fusioncharts/Charts|__swift/themes|__swift/javascript/__global/thirdparty/TinyMCE/plugins)(.*)$ { try_files $uri $uri/ /$1/index.php?$2; }
- Open your nginx.conf configuration file (this may be located under
-
If you use Apache:
NOTE: This knowledgebase is an example of working web server rules/settings that can be used in an ideal server setup to switch to SEO friendly URLs. If the same rules are not working in your server environment, please contact your web server admin to edit the rules accordingly as we do not provide web server specific support.