powerhoster Posted November 25, 2009 Share Posted November 25, 2009 I searched this forum and want to find a howto to make SEO friendly URL for whmcs but failed. eg. whmcs/knowledgebase.php?action=displaycat&catid=1 to something like whmcs/title_topic_keyword.html Can anyone help ? Thanks 0 Quote Link to comment Share on other sites More sharing options...
gearheadhost Posted November 25, 2009 Share Posted November 25, 2009 Within the admin control panel click Setup > General Settings > Other > KB SEO Friendly URLs /win 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Support Manager WHMCS John Posted November 25, 2009 WHMCS Support Manager Share Posted November 25, 2009 http://wiki.whmcs.com/Support_Center#Search_Engine_Friendly_URLS 0 Quote Link to comment Share on other sites More sharing options...
LaceHost-Ishan Posted November 25, 2009 Share Posted November 25, 2009 John, It would be great if the order links were also rewritten. 0 Quote Link to comment Share on other sites More sharing options...
ServWise.com Posted November 25, 2009 Share Posted November 25, 2009 Most every URL can be rewritten if you have the mind to do it however you have to ask yourself why would you want to rewrite all the URLs. We make all our main pages and product listing pages SEO friendly but there is no reason for search engines to need to spider pages within the order process. The whole process however does need you to know something about mod_rewrite rules and the WHMCS template system it is not built into WHMCS apart from the knowledge base (which we don't use anyway as it is not multi-lingual). 0 Quote Link to comment Share on other sites More sharing options...
powerhoster Posted November 28, 2009 Author Share Posted November 28, 2009 (edited) Made it work now. Thanks all for your help, especially thanks for whmcs staff's perfect help. It worked when I upgraded to the newest version. Edited November 28, 2009 by powerhoster upgrade 0 Quote Link to comment Share on other sites More sharing options...
KevinR Posted December 11, 2009 Share Posted December 11, 2009 I was wondering if there was a way to rename the ordering links as well such as panel/cart.php?gid=3 to panel/some_product 0 Quote Link to comment Share on other sites More sharing options...
magic1000 Posted December 11, 2009 Share Posted December 11, 2009 If I use Vietnamese as: tôi > toi.html? 0 Quote Link to comment Share on other sites More sharing options...
Cape Dave Posted December 11, 2009 Share Posted December 11, 2009 Great question. 0 Quote Link to comment Share on other sites More sharing options...
ServWise.com Posted December 11, 2009 Share Posted December 11, 2009 Sure there is, if you know the URL then simply rewrite it in your .htaccess e.g. RewriteRule ^panel/order-linux-hosting.htm /panel/cart.php?gid=3 [NC,LP,QSA] With a little work you could also alter the templates to generate automatic seo urls. First create a smarty plugin modifier, in \includes\smarty\plugins\ create a blank text file called "modifier.str2seourl.php" and add the following code to it - <?php /** * Smarty plugin * @package Smarty * @subpackage plugins */ /** * Smarty lower modifier plugin * * Type: modifier<br> * Name: str2seourl<br> * Purpose: converts a string to SEO friendly url. * @link http://www.servwise.com * @author Sam Morgan * @param string * @return string */ function smarty_modifier_str2seourl($string) { $separator = "-"; $string = trim($string); $string = strtolower($string); // convert to lowercase text // Only space, letters, numbers and underscore are allowed $string = trim(ereg_replace("[^ A-Za-z0-9_]", " ", $string)); $string = ereg_replace("[ tnr]+", "-", $string); $string = str_replace(" ", $separator, $string); $string = ereg_replace("[ -]+", "-", $string); return $string; } ?> Then look in your /orderforms/xxx/products.tpl template. (xxx is the template style you are using) and find the code for generating the links. e.g. <input type="button" value="{$LANG.ordernowbutton}"{if $product.qty eq "0"} disabled{/if} onclick="window.location='{$smarty.server.PHP_SELF}?a=add&pid={$product.pid}'" /> modify it to create seo friendly links using the product title. {if $product.qty eq "0"} <a href="#" class="nobuylink">Out of Stock</a> {else} <a href="/order/{$product.pid}/{$product.name|str2seourl}.htm" class="buylink">Order now</a> {/if} In your .htaccess add the following line (Replace whmcs with the folder where whmcs is installed) RewriteRule ^order/(.*)/(.*).htm /whmcs/cart.php?gid=$1 [NC,LP,QSA] I have just written this now and it is untested but looks correct AFAICS. 0 Quote Link to comment Share on other sites More sharing options...
dotcom22 Posted December 23, 2009 Share Posted December 23, 2009 hello I have enabled SEO and all work well.... The generated URL look like this: http://www.mysite.com/whmcs/knowledgebase/18/about-domain-name.html I would like change the folder name "knowledgebase" with another term because my site are not in english...How I can do that ? I have try top simply rename this term present inside htaccess file but this don't work and make error 404... thank cheers 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.