Email Article To a Friend View Printable Version

Permanently Redirecting Domain Pages with Geeklog

GeekLog

I have a number of domain names and previously blogged on how to make Geeklog work on all of them.

I’ve decided now to concentrate on one domain name: julian-kuiters.id.au

There is already a number of links to my other domains, so I needed to configure Geeklog to redirect people to the new domain. I think that re-direct pages are pretty annoying, so I opted to use “HTTP/1.1 301 Moved Permanently” to indicate to browsers and search engines the new address.

After quite a few attempts at inserting the redirect code in the theme, I opted to place it in the lib-common.php file.

The basic code to redirect any connects not on my primary domain is:

	if ($_SERVER['SERVER_NAME'] != 'www.julian-kuiters.id.au')
      {
 		header("HTTP/1.1 301 Moved Permanently"); // Convert to GET
		header("Location: http://www.julian-kuiters.id.au" . $_SERVER['REQUEST_URI']);
    		header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');

      }

And I inserted it into the function COM_siteHeader of lib-common.php

function COM_siteHeader( $what = 'menu', $pagetitle = '', $headercode = '' )
{
    global $_CONF, $_TABLES, $_USER, $LANG01, $LANG_BUTTONS, $LANG_CHARSET,
           $LANG_DIRECTION, $_IMAGE_TYPE, $topic, $_COM_VERBOSE;


	//jkuiters 20070420
	if ($_SERVER['SERVER_NAME'] != 'www.julian-kuiters.id.au')
      {
 		header("HTTP/1.1 301 Moved Permanently"); // Convert to GET
		header("Location: http://www.julian-kuiters.id.au" . $_SERVER['REQUEST_URI']);
    		header('Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0');

      }

    // If the theme implemented this for us then call their version instead.

    $function = $_CONF['theme'] . '_siteHeader';

As you can now see, the same url on different domains automatically takes you to the correct site.



Share
  • Facebook
  • Google Bookmarks
  • Ask
  • LinkedIn
  • Socialogs
  • Wikio
  • Digg
  • Twitter
  • SlashDot
  • Reddit
  • MySpace
  • Del.icio.us
  • Blogter
  • BlogMemes
  • Yahoo Buzz




Email Article To a Friend View Printable Version

Hey Geeklog! Where did my [ story: ] go?

GeekLog

After receiving so much comment/trackback spam recently, I decided to make some changes to my site. Asides from the unrelated and often very undesirable content of the spam, textual urls were being turned into hyperlinks by Geeklog. I'd already removed the tag from the list of permitted html (configurable through $_CONF['user_html']). So I headed off to the config.php file to find the setting the was auto creating links.

Eventually I tracked down the following setting:


// disables autolinks if set to 1
$_CONF['disable_autolinks'] = 0; // 0 = autolinks enabled

Ah easy! I'll change that to a 1 and all will be well.

Or so I thought.

Turns out that this setting doesn't control the magical conversion of http://ww... into http://ww.. It controls the conversion of [story:], [link:], [event:] and [staticpage:] tags; tags that do article linking. Very useful tags.

I've turned this feature back on (by turning the disable option off. Go double negatives!). Any weird linking text should be back to normal now.

Sometimes I really wish there was more inline documentation in the config.php file.



Share
  • Facebook
  • Google Bookmarks
  • Ask
  • LinkedIn
  • Socialogs
  • Wikio
  • Digg
  • Twitter
  • SlashDot
  • Reddit
  • MySpace
  • Del.icio.us
  • Blogter
  • BlogMemes
  • Yahoo Buzz






Email Article To a Friend View Printable Version

RSS Feed Autodiscovery & Pinging

GeekLog

If you're using GeekLog you're probably aware of the Content Syndication / RSS Feed feature. It will automatically output the stories from your site, or a topic, into a standard RSS XML file that can be polled for updates.

With more and more blogs coming online, search engines like Google are starting to build specialised blog search engines.

In order for the search engines to add your RSS feed, they need to be able to find it. And it's pretty simple to make that happen.

Most important of course is to link to your RSS feed on all the relevant pages of your site. Seeing as mine is site wide, I created a new Block and placed it in the left column. I called it RSS and filled it with this code:

<a href="http://www.julian-kuiters.id.au/backend/julian-kuiters.xml"><img src="/images/xml.gif" border=0 valign="absbottom"></a> <a href="http://www.julian-kuiters.id.au/backend/julian-kuiters.rss">Rss Feed</a>

<link rel="alternate" type="application/rss+xml" title="RSS" href="/backend/julian-kuiters.xml" />

The first part basically makes a visible link the visitors can click to get the feed. I created both a .xml and .rss feed, as some people were having troubles with the .rss one because the filetype hasn't been setup in the webserver.

The <link rel tag basically creates a meta link to the rss feed, that saves spiders from having to crawl more than one page. They can see this link and know what it is for, without even crawling that file.

You can verify that your RSS Feed can be discovered using the rss auto-discover tool.

Pinging

Once you can be discovered, its time to let everyone know you have updated stories on your site. "Pinging" is the best way to do this, and seeing as GeekLog currently has no plug in for it yet, try using some auto-pinging websites. Enter the url of your website (not the url of your rss feed!) and let them do the work for you.

Remember to ping everytime you add a new story. This will allow them to know you have fresh content, and the blog search engines should update.

You could try these pinging sites to get started:



Share
  • Facebook
  • Google Bookmarks
  • Ask
  • LinkedIn
  • Socialogs
  • Wikio
  • Digg
  • Twitter
  • SlashDot
  • Reddit
  • MySpace
  • Del.icio.us
  • Blogter
  • BlogMemes
  • Yahoo Buzz






Email Article To a Friend View Printable Version

No I don't want every day of my life in Google!

GeekLog

Ah, the sweet romance of a developer and an over excited search engine. How I long for my bandwidth back!

If you stopped by in the last three days you would have recieved a 'bandwidth usage limit exceeded' message from my ISP. If you were me you'd think that odd seeing as there are so few visitors at the moment.

To be fair, it was my fault. I'd allowed the bots to crawl my entire website, including every day of the calendar. Google clocked over 44,000 hits!

Read on to see what I did wrong.



Share
  • Facebook
  • Google Bookmarks
  • Ask
  • LinkedIn
  • Socialogs
  • Wikio
  • Digg
  • Twitter
  • SlashDot
  • Reddit
  • MySpace
  • Del.icio.us
  • Blogter
  • BlogMemes
  • Yahoo Buzz






Email Article To a Friend View Printable Version

Multiple domain names, one geeklog

GeekLog

Geeklog (the software driving this site) requires you to set the home url in config.php.

I use multiple domain names here:
juliankuiters.id.au
julian-kuiters.id.au
synthesisone.com
so I wanted to configure geeklog to allow visitors to use the website through each of these domans.

Geeklogs default behaviour is to prefix the value of $_CONF['site_url'] from config.php to all the links it displays. With a hard coded domain set in $_CONF['site_url'], all your visitors will be refered to that domain, regardless of which one they first visit your site on.

Change $_CONF['site_url'] in your config.php to:

$_CONF['site_url'] = 'http://' . $_SERVER["HTTP_HOST"];
and you will find Geeklog now keeps your vistor on the same domain name as they started.

Of course, if you have geeklog in a subdirectory of your website root directory, you will need to append that to the end, something like:

$_CONF['site_url'] = 'http://' . $_SERVER["HTTP_HOST"] . '/geeklog';

Tokyoahead's forums also has some details on how to run multiple Geeklog sites with one backend directory: http://tokyoahead.com/main/article.php?story=20040223133540904
Share
  • Facebook
  • Google Bookmarks
  • Ask
  • LinkedIn
  • Socialogs
  • Wikio
  • Digg
  • Twitter
  • SlashDot
  • Reddit
  • MySpace
  • Del.icio.us
  • Blogter
  • BlogMemes
  • Yahoo Buzz

Gold Coast Aquarium Maintenance | Gold Coast Marine Fish | Gold Coast Tropical Fish
Jewel Jones - Counselling Service - Penrith, Richmond
 
     
 Copyright © 2017 Julian Kuiters
 All trademarks and copyrights on this page are owned by their respective owners.