Jump to content

New SEO friendly links, can I replace "_" with "-"?


Zorro67

Recommended Posts

Hi all, hav recently upgraded to 3.8.1, and managed to implement SEF links successfully.

 

however, one small issue; the 'replace' character is "_", which anyone with any knowlege of SEO knows joins a word rather than separates it.

 

So google sees "thisisanarticleabouthowtouploademail.htm" instead of "this is an article about how to upload email.htm"

 

I tried the below code (the bold added section is a residual snip from pre 3.8.1), is from knowledbase.tpl, but it don't work.

 

<a href="{if $seofriendlyurls}knowledgebase/{$kbcat.id}/{$kbcat.urlfriendlyname|regex_replace:"_":"-"}{else}knowledgebase.php?action=displaycat&catid={$kbcat.id}{/if}">{$kbcat.name}</a> ({$kbcat.numarticles})</b>

 

Have i got the code wrong, its not do-able, or do i need to put in a FR to Matt to have the urlfriendly link changed from "_" to "-"?

Link to comment
Share on other sites

Thanks sparky,

 

Also realised that you also have to change the _in your breadcrumb navigation. So in your header tpl file, look for

{$breadcrumbnav}</span>

 

and replace it with

 

{$breadcrumbnav|regex_replace:"/[_]/":"-"}</span>

 

A further longer thread about SEO in WHMCS is located at

http://forum.whmcs.com/showthread.php?p=30233

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated