1. Kayako Download customers: we will continue to develop and support Kayako Download beyond July 2017, alongside the new Kayako for existing customers.

    Find out more.

  2. The forum you are viewing relates to Kayako Classic. If you signed up or upgraded to the new Kayako (after the 4th July 2016), the information in this thread may not apply to you. You can visit the forums for the new Kayako here.

SEO Friendly URLs

Discussion in 'Using Kayako Classic' started by stromimport, Oct 19, 2010.

  1. nibb

    nibb Reputed Member

    My mystake guys. I forgot to add the variable in "visitor/index.php"

    Chat is working now as well. I will keep researching :)
  2. AndyD

    AndyD Established Member

    I changed the existing line.
  3. zomoco

    zomoco New Member

    FWIW, here's a Lighttpd config snippet that does roughly what the Apache config above does:

       url.redirect = (
          "^/admin$"    => "/admin/",
          "^/staff$"    => "/staff/",
          "^/visitor$"  => "/visitor/"
        url.rewrite-if-not-file = (
          "^/admin/(.*)$"   => "/admin/index.php?$1",
          "^/staff/(.*)$"   => "/staff/index.php?$1",
          "^/visitor/(.*)$" => "/visitor/index.php?$1",
          "^/(.*)$"         => "/index.php?$1"
    This is coupled with
    define('SWIFT_BASENAME', '');
    in __swift/config/config.php
  4. kevinbarker

    kevinbarker Member

    I am running the latest version - with apache/

    I am not able to edit /staff/index.php or /admin/index.php as when i right click to edit, all the file contains is

    <?php @Zend;
    /* cts/zend_engine">Zend Engine</a>.</p></body></html>
  5. theodoreenfield

    theodoreenfield New Member

    here you are with .htaccess code check this..

    <IfModule mod_rewrite.c>
    RewriteEngine on

    # 301 redirect to domain to 'www.'
    RewriteCond %{HTTP_HOST} ^kidz-planet.org$ [NC]
    RewriteRule ^(.*)$ http://www.kidz-planet.org/$1 [R=301,L]
  6. Tyler Menezes

    Tyler Menezes New Member

    This should do it for you all for Apache. Admin, Staff, etc all work fine. It's a bit hacky, though.

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond $1 !^(admin|api|console|favicon\.ico|robots\.txt|sitemap\.xml|index\.php|tiny_mce_gzip\.php|cron|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]
  7. b2bweb

    b2bweb New Member

    Based on Tyler's Apache re-write rules (thanks for that!), I've managed to convert this to work fine in clients, staff and admin with IIS 7+ using IIS URL Re-write 2 add-on...

    Same pre-requisite - change the line in "<site_root>\__swift\config\config.php" so that the "SWIFT_BASENAME" definition is empty:

    Then, place the attached web.config file in the root of the Kayako installation (or, if the file exists, edit your existing web.config file and paste the "configuration/system.webServer/rewrite" section from the my web.config file into your own).

    If you have multiple template groups set up, you'll need to tweak the re-write a bit further so that the CSS and other dynamic assets are served up correctly (eg: I have an "Intranet" template group... using the url of http://mysite.org.au/Intranet/ works fine for the basic content and images, but stuff like CSS which is compiled and compressed using a __swift module breaks) Let me know if people need this - it'll just be a case up adding a few extra exclusions to the rewrite conditions...

    One final tip - flush your browser cache... Saw some wierdness after making these changes, whereby the moment you filled in your login details and clicked [Login], it immediately bounced you back again to the login screen with "Session Expired" - this resolved itself the moment I flushed my browser cache and site cookies... (Using Fusion 4.01.204 btw)...

    Hope this helps someone... :D



    Attached Files:

  8. argos

    argos Member

    @Tyler, that works like a charm. I asked that code a year ago to Kayako team but they answered it was outside their scope to provide it.
    THIS is what a COMMUNITY means !
    THANKS, really !

    Besides, just for people that have installed FUSION inside a FOLDER -instead of at root level of a domain- they should consider adding this to your code:

    RewriteBase /NameOFtheFOLDERhere/

    Thanks AGAIN !
  9. mascotoc

    mascotoc Member

    Here is the problem with the following code.

    "admin > Tickets > Autoclose" doesn't work, the ajax loader keeps loading and when viewed in firebug, it throws Error 500 (Internal server error)

    Its very strange that only this one link doesnt work..

    Any solution?

  10. Tyler Menezes

    Tyler Menezes New Member

    Looks like there is a bug in certain version of Kayako: Admin -> Tickets -> Autoclose tries to load http://foo.com/adminTickets/AutoClose/Manage/[...]. Note the missing slash between admin and Tickets? This is a problem in Kayako, you should open a bug report with them.

    You could probably get rid of the 500 error by changing:
    RewriteRule ^([a-zA-Z0-9]*)/(.*)$ $1/index.php?/$2 [L]

    RewriteRule ^(admin|api|console|cron|staff|rss|setup|visitor|winapp|wallboard|__swift)/(.*)$ $1/index.php?/$2 [L]

    but that will only have the effect of changing it to a 404 error.

    As a quick fix, add the line:
    RewriteRule ^adminTickets/(.*)$ admin/index.php?Tickets/$1 [L]

    directly under "RewriteEngine On", which will rewrite that specific page. Kayako should really fix this, though.
  11. mascotoc

    mascotoc Member

    Hello Tyler, thanx for that.

    Yes, I noticed that and I have sent them a screenshot of showing the missing slash already.. but you know, kayako guys will entertain only when there is problem with their own version.. i mean they wotn consider if you apply any hacks like this.. when they disabled htaccess it worked.. so we have to solve this problem.

    BTW, your suggestion worked

    Thanks again.

  12. mascotoc

    mascotoc Member

    He he... I found the bug

    In their language file

    5 => array ('Links', '/Tickets/Link/Manage'),
    8 => array ('Auto Close', 'Tickets/AutoClose/Manage'),

    the slash is missing :)
  13. b2bweb

    b2bweb New Member

    .. And if anyone is wondering which file to modify - the language file you need to tinker with is in /__swift/locale/en-us/en-us.php ...

    If you're working with 4.01.204, it's line #508... If you're working with 4.01.240, it's line #509 that needs the "/" added before "Tickets".... (same glitch in both versions)

    Cheers! :)
  14. mascotoc

    mascotoc Member

    Yup, I have already reported this as a bug to them, and they should be changing it in upcoming update.
  15. pol67

    pol67 Reputed Member

    In the .htacces file add:
    <IfModule mod_rewrite.c>
    RewriteEngine On

    $!^(admin|api|console|favicon\.ico|robots\.txt|sitemap\.xml|index\.php|tiny_mce_gzip\.php|cron|staff|rss|setup|visitor|winapp|wallboard|__swift) [NC]
    RewriteCond $!\.(jpg|jpeg|png|gif|js|css|htm|html)$ [NC]
    RewriteCond %{REQUEST_FILENAME} !-f
    ^(.*)$ index.php?/$[L]

    RewriteCond $!^(favicon\.ico|robots\.txt|sitemap\.xml|index\.php|tiny_mce_gzip\.php|__swift) [NC]
    RewriteCond $!\.(jpg|jpeg|png|gif|js|css|htm|html)$ [NC]
    RewriteCond %{REQUEST_FILENAME} !-f
    ^([a-zA-Z0-9]*)/(.*)$ $1/index.php?/$[L]
    In __swift/config/config.php replace "define('SWIFT_BASENAME', 'index.php?');" with this:
  16. vladimir3000

    vladimir3000 New Member

    I think you should add previous post .htaccess base rule into release
  17. Danish Wadhwa

    Danish Wadhwa New Member

  18. Jamie Edwards

    Jamie Edwards Staff Member

    Hi Danish,

    Those integers (the IDs) are essential. It is those that tell Kayako which article/category to load.
  19. Danish Wadhwa

    Danish Wadhwa New Member

    Hey Thanks Jamie for replying :)

    But with this the url goes very long, so i believe there is no way in fusion to short me url. Because when the sub-categories comes into picture this url will become more long. Thanks again!
  20. jacksony

    jacksony Member

    Thanks. Can someone share what are the steps to convert kayako v4 to SEO friendly? For apache.

    Just wondering, is there a reason Kayako do not want to incorporate SEO friendliness into Kayako?

Share This Page