Recent Topics

1 Jul 29, 2008 11:57    

My b2evolution Version: Not Entered

Hi all

First off a big thanks to Francois and all who support this great product :D

I have what is probably a stupid question about permalinks

I've just upgraded my friends blog to version 2.4.2 and whilst developing the skin etc we ran on a parallel test server and all seemed fine

then I moved this to the live server and he's noticed something curious

the permalinks for new posts have dashes(-) replacing spaces in a title, whereas old entries have underscores(_)

this hasn't broken anything, as all the posts still work, but we'd prefer to be consistent

now I'm sure I've seen a setting for this somewhere, but I'm damned if I can find it now

can anyone help please?

muff

2 Jul 30, 2008 00:40

I don't recall this as a setting - but it could be. It MIGHT be a hack in a file somewhere as well. Anyway my understanding is that a little bit of testing showed that search engines like dashes more than underscores in titles. Specifically, two identical pages except one has dashes and the other underscores for spaces in the title results in the dashed one getting SE love over the underscored page.

3 Jul 30, 2008 10:19

It is hardcoded. The function you want to change is replace_special_chars() in inc/locales/_charset.funcs.php around line 76:

// Replace non acceptable chars
	$str = preg_replace( '/[^A-Za-z0-9_]+/', '-', $str );

This function is called by ultitle_validate() (on inc/items/model/_item.funcs.php line 127)

4 Jul 30, 2008 17:04

This was changed from underscores to dashes sometime ago, due to SEO motivation, I think.


Form is loading...