Recent Topics

1 Dec 20, 2009 16:51    

Is it possible for one post to have two urls at the same time.The idea is one being long and seo-friendly, the other to be short and eye-mind friendly ,, such as,

www.domain.com/news/politics/people/obama/obama-refused-to-cool-his-heels‎;

www.domain.com/post217

2 Dec 20, 2009 22:36

Blueyed said he was going to implement that a couple of months ago. Apparently he hasn't done it yet.

3 Dec 21, 2009 01:22

Good to know, at least its doable and being worked on.. maybe i ll poke him to ask at what stage he is at, if he doesnt respond in a few days

4 Dec 21, 2009 09:55

Just uncheck "301 redirect to canonical URL" and use domain.com/?p=444

5 Dec 21, 2009 18:26

but if i uncheck redirect canonical urls; then it wont redirect to the new url afaik. For example i made a typo and fixed the title so that url has changed twice but this time it wont redirect the former to the latter, right ?

6 Dec 21, 2009 21:19

then it wont redirect to the new url afaik.

It's true, but why do you think search engines won't like urls like domain.com/p1234 ? They are short and don't use params, why do you really need "/some_category/my_long_url_ggg" ?

I even made a plugin which makes nice URLs like "p1234" when post is saved :)

7 Dec 21, 2009 21:34

naturally i ve missed that plugin.. ll check it sometime for sure..

about the search engines, its at least important for my quote website, to include authors names and what they said the quote about, coz people search like "einstein maths quotes" in Turkish and they end up at my site..context is a secondary priority for google, links come first

8 Dec 21, 2009 21:39

This is not a public plugin, it's too small for it, I use it on my website only. The idea is to get the ID of created/edited item and make an URL out of it.

    function AfterItemInsert( & $params )
	{
		if( !empty($params['Item']->ID) )
		{
			global $DB;
			
			$DB->query('UPDATE T_items__item SET
					    post_urltitle = "'.$DB->escape('p'.$params['Item']->ID).'"
						WHERE post_ID = '.$params['Item']->ID);
			
			return true;
		}
	}
	
	
	function AfterItemUpdate( & $params )
	{
		return $this->AfterItemInsert( $params );
	}

9 Dec 21, 2009 22:09

cool.. i ll give it a try... where do i insert this... into index.main.php under skin ? somewhere after title ?

11 Dec 23, 2009 10:38

tilqicom wrote:

cool.. i ll give it a try... where do i insert this... into index.main.php under skin ? somewhere after title ?

Put that code in a plugin. You can use the plugins/skeleton.plugin.php as a starting point.


Form is loading...