Page 1 of 1

URL Rewrite for HESK

Posted: Wed Mar 24, 2010 7:56 am
by hefin
I wanted to know can we add url rewrite to our HESK applications.

like a url http://hefin.in/knowaboutme should redirect to http://hefin.in/knowledgebase.php?article=2

Which makes it more Search Engine Friendly

can anyone help me with this modification.

And also please check http://hefin.in

In this site i have added my Copyright Hefin.in statement is it against the rule? please let me know.

thanks in advance

Regards
Hefin Dsouza

Posted: Wed Mar 24, 2010 8:03 am
by Klemen
This is something you need to set up on your server (for example using .htaccess) and has nothing to do with HESK.

Yes, you may add your own Copyright (after all, the text in the articles is indeed yours), just the Powered by links must remain intact unless you purchase a license.

Can you please help me with it

Posted: Thu Mar 25, 2010 5:59 am
by hefin
Can you help me with how do i go ahead with the url rewriting..

Even if you guide me to an article will be helpfull..
Thanks

Posted: Thu Mar 25, 2010 6:12 am
by Henrie

Posted: Thu Mar 25, 2010 12:20 pm
by hefin
I got the funda of rewriting the urls in HTACCESS file by using the

Code: Select all

RewriteRule 
what exactly i want it to work as is

When I add a new Article the url of the article should be a user friendly url like 68KB Faq does

The reason I migrated to HESK is because i got good reviews and I really like HESK only thing that is not working right is the Search Results in Google I used to get my articles listed in google when i used 68KB but now using the new HESK i dont get it.That is the reason i want to add this url rewrite funda in HESK..

I need to do something like while adding the Article I will enter the custom URI and then it should be added in the HTACCESS.

Can you help me with this please even if not complete just give me the steps ill work on it.

Thanks In advance[/url]

Posted: Thu Mar 25, 2010 5:00 pm
by Henrie
hefin wrote:Can you help me with this please even if not complete just give me the steps ill work on it.

Sorry, I never had to use url rewriting myself, so I can not help you here.

Greetings,
Henrie

Posted: Sat Mar 27, 2010 10:11 am
by Klemen
You might be better of creating "301 - moved permanently" redirects from your old links to the new articles so Google (and other search engines) pick up the new links.

For example use htaccess to redirect
http://yoursite/old-article.php
to
http://yoursite/hesk/path-to-new-article.php

http://www.google.com/search?q=htaccess+301+redirect

Re: URL Rewrite for HESK

Posted: Sun Jun 05, 2011 7:56 pm
by fanta
did you manage to find a way to rewrite hesk urls with htaccess?

Re: URL Rewrite for HESK

Posted: Thu Sep 13, 2012 12:29 pm
by hostwebservice.com
Hi

Sorry for update this old thread.

I'm trying to add url rewrite to hesk.

Actual helpdesk is located in
www. hostwebservice.com/supporto

I have added this url rewrite code without success

Code: Select all

RewriteEngine On
RewriteRule ^supporto/knowledgebase/article/(.*)/(.*).html supporto/knowledgebase.php?article=$1&%{QUERY_STRING} [PT,L]
RewriteRule ^supporto/knowledgebase/category/(.*)/(.*).html supporto/knowledgebase.php?category=$1&%{QUERY_STRING} [PT,L]
Someone can help me ?

Marino

Re: URL Rewrite for HESK

Posted: Thu Jan 10, 2013 10:49 am
by t2s
I made rewrite links KB articles

first add

Code: Select all

RewriteEngine On
RewriteRule ^[a-z0-9\-\_]+-([0-9]+)\.html$ knowledgebase.php?article=$1
in .htacces file

next open knowledgebase_functions.inc.php
find

Code: Select all

<td valign="top">&nbsp;<a href="knowledgebase.php?article=' . $article['id'] . '">' . $article['subject'] . '</a></td>
line 117 and 222
and replace whit

Code: Select all

<td valign="top">&nbsp;<a href="'.przyjazny_string($article['subject']).'-' . $article['id'] . '.html">' . $article['subject'] . '</a></td>
then add at end this function

Code: Select all

function przyjazny_string($tekst){
  $a = array('À', 'Á', 'Â', 'Ã', 'Ä', 'Å', 'Æ', 'Ç', 'È', 'É', 'Ê', 'Ë', 'Ì', 'Í', 'Î', 'Ï', 'Ð', 'Ñ', 'Ò', 'Ó', 'Ô', 'Õ', 'Ö', 'Ø', 'Ù', 'Ú', 'Û', 'Ü', 'Ý', 'ß', 'à', 'á', 'â', 'ã', 'ä', 'å', 'æ', 'ç', 'è', 'é', 'ê', 'ë', 'ì', 'í', 'î', 'ï', 'ñ', 'ò', 'ó', 'ô', 'õ', 'ö', 'ø', 'ù', 'ú', 'û', 'ü', 'ý', 'ÿ', 'Ā', 'ā', 'Ă', 'ă', 'Ą', 'ą', 'Ć', 'ć', 'Ĉ', 'ĉ', 'Ċ', 'ċ', 'Č', 'č', 'Ď', 'ď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a', 'a', 'ae', 'c', 'e', 'e', 'e', 'e', 'i', 'i', 'i', 'i', 'n', 'o', 'o', 'o', 'o', 'o', 'o', 'u', 'u', 'u', 'u', 'y', 'y', 'A', 'a', 'A', 'a', 'A', 'a', 'C', 'c', 'C', 'c', 'C', 'c', 'C', 'c', 'D', 'd', 'D', 'd', 'E', 'e', 'E', 'e', 'E', 'e', 'E', 'e', 'E', 'e', 'G', 'g', 'G', 'g', 'G', 'g', 'G', 'g', 'H', 'h', 'H', 'h', 'I', 'i', 'I', 'i', 'I', 'i', 'I', 'i', 'I', 'i', 'IJ', 'ij', 'J', 'j', 'K', 'k', 'L', 'l', 'L', 'l', 'L', 'l', 'L', 'l', 'l', 'l', 'N', 'n', 'N', 'n', 'N', 'n', 'n', 'O', 'o', 'O', 'o', 'O', 'o', 'OE', 'oe', 'R', 'r', 'R', 'r', 'R', 'r', 'S', 's', 'S', 's', 'S', 's', 'S', 's', 'T', 't', 'T', 't', 'T', 't', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'W', 'w', 'Y', 'y', 'Y', 'Z', 'z', 'Z', 'z', 'Z', 'z', 's', 'f', 'O', 'o', 'U', 'u', 'A', 'a', 'I', 'i', 'O', 'o', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'U', 'u', 'A', 'a', 'AE', 'ae', 'O', 'o');


  return strtolower(preg_replace(array('/[^a-zA-Z0-9 -]/', '/[ -]+/', '/^-|-$/'),
  array('', '_', ''), str_replace($a, $b, $tekst)));
}
open knowledgebase.php and find

Code: Select all

<td valign="top"><a href="knowledgebase.php?article='.$article['id'].'">'.$article['subject'].'</a></td>
replace whit

Code: Select all

<td valign="top"><a href="'.przyjazny_string($article['subject']).'-' . $article['id'] . '.html">'.$article['subject'].'</a></td>
links change from /knowledgebase.php?articel=x to /topic_of_article-x.html

Re: URL Rewrite for HESK

Posted: Thu Jan 10, 2013 11:19 am
by hostwebservice.com
t2s wrote:.......
It works !!

Thanks

Marino