[TYPO3-english] simulateStaticDocuments: Getting rid of "alias" in URLs without loosing page rank!?

Martin Bless m.bless at gmx.de
Fri Apr 2 00:58:51 CEST 2010


[Peter Russ] wrote & schrieb:

>>[Martin Bless] 
>>Wishful thinking ...
>> An option would be great that tells simulateStaticDocuments to always
>> use numbers on creation of links while still accepting aliases on
>> receiving.
>> 
>> 
>> Switching to realurl or cooluri ist not an option.
>
>Check the appropriate pages and do a permanent redirect to the new ones. 
>Google will accept that whithout loosing page rank.

Ok, that's an option. But not really, since there are ca. 1.300 pages
with aliases.

Meanwhile I've looked into the code. It seems that only a single line
has to be changed to make my dream come true:
$url = $this->makeSimulatedFileName(
	$page['title'],
	($page['alias'] ? $page['alias'] : $page['uid']), // gotcha!
	intval($parameters['typeNum']),
	$LD['linkVars'],
	($LD['no_cache'] ? true : false)
);

I did a quick test. If I change it to 
	($page['alias'] ? $page['uid'] : $page['uid']),	// gotcha!

the alias isn't used any more for link generation. But it's still
accepted when received. 

Maybe I'll do some further testing and invent an option like
$this->conf['simulateStaticDocuments_noAliases'] and prepare a patch.

Martin

-- 
http://mbless.de


More information about the TYPO3-english mailing list