bloginfo('name');

bloginfo('description');

Archives Posts

Simply and dirty SEO SessionID Killer in PHP

Juli 23rd, 2008 by Blu:RayNe

Here’s a littlte snippet to kill SessionIDs for all results Googlebot and his companias like Yahoo SLURP! or ia_archiver fishes.

Point is, that if you generate SessionIDs in the URIs of your site, robots will fetch each page as new page generating duplicate content in the database of the search engine which results in bad ranking.

Here’s the code:

if (preg_match("/(robot|indexer|slurp|archiver|spider|crawler|[\w-_ ]bot(\W|$))/ims", $_SERVER[‘HTTP_USER_AGENT’])) {
    $sessionName = session_name();
    $uri = $_SERVER[‘REQUEST_URI’];
    if (preg_match("/&{$sessionName}=[a-z0-9]+/ims",  $uri)) {
        $uri = preg_replace("/&{$sessionName}=[a-z0-9]+/ims", , $uri);
        header("HTTP/1.1 301 Moved Permanently");
        header("Location: $uri");
        exit(0);
    }
    function seo_sid_callback($buffer) {
        return preg_replace("/(&|&)".session_name()."=[a-z0-9]+/ims", , $buffer);
    }
    ob_start("seo_sid_callback");
}
 

Make sure you don’t post this snippet inside a ob_start()-Block! It has to be top-level. Here’s a better way to check for spiders – just in case you want to write something more sophisticated ;)

Yes, i had one of these old sites back from the time when MacOS9 browsers – namely Internet Explorer Mac – had problems submitting cookies for every page, or didn’t get cookies set right (although the browser’slayout engine worked better than that on windows).

At least nowadays i haven’t encountered user problems using transient session ids.

Filed under Allgemein having No Comments »

Archives Posts

Oh my god! WindowsVista SP1 is on my new laptop!

Juli 18th, 2008 by Blu:RayNe

I have to excuse by being to positive about that system. Semantic reorganisation of the UI, more stability and a better kernel is great. But as i see after starting wit Windows Vista Microsoft’s OS became a not understandable bureaucracy out of hell. It’s real horror! Let me explain – Yesterday, I got yesterday my new company laptop:

  • Uninstaller. I needed about more than 1h to uninstall some little programs like MS Office, Acronis TrueImage, Acrobat Reader and so on. I was not able to launch multiple uninstallers or uninstall multiple programs at once. Instead i was forced to wait until an uninstall finished, then click around and launch the next one…I really ask you guys at Microsoft why yout have the really advanced Windows Installer 4.5, when no one uses it? Why do i have to monitor the uninstall process? Why i’m not able to do multiple uninstalls like in Linux? And why the hell does it take so long? – Okay you may say it’s the bad companies to blame! But i don’t understand why they had to pay for driver certifications? You could have put the same effort in a real package management!
  • Setting up WLAN. It told me no networks could have been found. Probably the fault could be my laptop has an WLAN On/Off-switch. Oh really? Is that WLAN-assistant to dump to really scan for the error? I hate to handle with vague error messages! At last it was really just the on/off switch. Thank god!
  • Notepad. Is this some kind of trademark? Or can someone explain why every beginner’s seminar in C++ or Delphi does better Notepads? At least it’s time to implement UNIX-line breaks and better char set-support!
  • Explorer – What a horrible mess of a file manager!
    • Statusbar and Details bar. To enable the important status bar you first have to go to „Organise“ to enable the menu, then select „View › Status bar“ then hide again the menu. Oh wait! Since we had that menu why not enable that „details view“ that takes so much space. Shit. It’s not in the view menu. Maybe it can be disabled by right-clicking. Why do i have to enable/disable the menu?
    • Explorer Sidebar. Why does every explorer window launch with that damn sidebar? Why I’m not able to switch it off? Why can’t i tell it open with the favorites sidebar by default? Even the space it takes is too little to see something really effective. It’s not effective at all! The concept of this is not finished!
    • Favorites Bar. I thought let’s put your favorite folders to the favorites sidebar and use that explorer thing like Mac OSX Finder or GNOME’s Nautilus. But the favorites menu was gone! Maybe you could now drag that directory just the the favorites bar? No way. I had to go back one folder and then drop it to the favorites area.
  • Task Manager. You still don’t see any command line or CPU-fraction or window-title but now have running applications. Still why should DAU Jones launch the task manager to kill hung programs? OK, now services are here. Oh goddammit! Why there are so many useless services fired up that actually have nothing to do?  There is no FAX!
  • Copying or moving files: Oh it’s damn slow! I guess files are somehow check before copying. Nice concept, but i prefer to do such things fast than safe. UAC, virus scanner, checking for permission are all tings I don’t need. They are nice features, but not if you try to copy your old home folder via LAN to your new laptop. I just had about 730KB/s resulting an an estimated total time of 13h! Anyway, installing TeraCopy solved the problem by doing it with about 4,7MB/s via WLAN ;) I can’t imagine checking the files or syncing for chances takes so long… Microsoft what have you done?!
  • Drivers. If you have a Windows Vista with SP1 you expect the drivers to work. Anyway, my DVD-RAM drive was gone. Great! In the device manager it said the driver could not be loaded and put out code 39. It was time again to play code-bingo on the Microsoft’s bulletin boards where i found first found  a friendly „The question cannot be answered unless you go to technet and ask there. Also check out the…“ – whatever!A friend told me about the problem last week so i was able to fix it asap by removing the Upper- and LowerFilters in the registry. He also had another driver problem where he found by debugging the calls a nice pointer to NULL without any further descriptions. Ok, let’s again blame that bad driver coders. But wait! Why you just cannot fix the problem by just reinstalling the drivers? Is Microsoft again excusing again by ununderstandable details and disobey the concepts of good driver implementations?Anyway, i already felt like being in Ubuntu just that Ubuntu is logical and i usually get pro support by going to their free forums or just looking into the Wiki.
  • Admin Authorisation Dialogs. I don’t know how you exactly call them, but they really bug me, especially when i cleanup the start menu. It just can’t remember that i give the authorisation just two seconds before or for what program i gave it. Linux and OSX does here fine and do not bug me. I understand the security concept behind it but even as admin user i get such windows. Yes, I am an admin i want to launch that device control panel. Damn you!
  • Start Menu. Nice that i now can press the windows-key which sets my prompt to the search field in the start menu. But i don’t understand why it can’t use the index-service to find files within the start menu? Launchy can do better than that. Also, i miss the results grouped by type of information found. And why does it always show me the whole start menu? Can’t it just be like GNOME Deskbar or OSX Spotlight?
  • Lags. I noticed some lags when the system did authentication and stuff. I don’t know what’s the cause, but i feel that these things increase over time. Once by showing me an authentication window it took about 1-2 to enumerate the users installed on the system. Oh no, it’s going to be damn slow…

Microsoft is obviously even to dumb to steal from Mac OSX or GNOME. I just can’t understand why a company with so many good people produce a bullshit of a system. Even if you look at the file structure it’s a mess greater than Windows XP.

I googled about performance and it was nice to see that video encoding is now faster? But after a colleague told me today his Windows Vista took about two minutes to start and the performance of copying files went to the ground and then even missed some files or just hung, i guess have to invest another 2h to install XP and basic drivers for my chip sets.

But do i still need Windows? WINE 1.1 is out and although it’s not perfect it runs. At least i don’t use windows programs that often. Perhaps i should really just install Ubuntu…well i don’t know, but Linux is definitely going to use the inner sectors  of the hard disk :)

UPDATE: Okay, Windows Vista is allowed to stay. SuperFetch and InstantOn/ReadyBoost is a great technology. Although i encountered a bluescreen (RADI driver fault caused by virus scanner while copying files over LAN?) it seems to run more stable. I still have some little problems with the new explorer and UAC is extremly bugging me. But i don’t want to  switch of these security feaures. In overall it is better than XP – excluding digital restrictions management – but sometimes it’s also really annoying.

Filed under Allgemein having No Comments »

Archives Posts

„Sehr geehrter Kunde, Ihre Mail ist Spam!“

Juli 16th, 2008 by Blu:RayNe

Und das sag ich immer wieder, da es anscheinend noch unzählige Leute in der Druck/IT-Branche gibt, die eigentlich hier nichts zu suchen hätten. Ich erhalte immer noch viel zu Mails ohne Subject und ohne eindeutigen Bodytext, der mir beschreiben würde, um was es eigentlich geht. Manchmal fehlt sogar die Ansprache, oder Footer mit Firmenadresse.

Selbst ist man damit oft zu Rücksprachen gezwungen, die oft lange überflüssige Telefongespräche nach sich ziehen. Aber besser wenn der Kunde von selbst anruft, da gibt es noch andere Möglichkeiten…

–„Neee.. ich habe Ihre E-Mail nicht gesehen.. ich glaube ich hab da nichts bekommen… moment… ich guck mal… ah.. hier.. Spam.. naja.. die Mail is ja auch Spam…“
– „Wie! Spam?! Meine Mail ist doch keine Spam… !“ (sichtlich verblüfft)
– „Kein Subject, kein Inhalt und nur eine PDF als Anhang wäre unter meiner Sichtweise auch Spam… und schließlich ist die Absenderadresse fälschbar. Oder was würde sie unter Sichtweise des Anti-Spam-Programms sagen?“

Und dann gab es gestern noch die Frage an mich: „Warum hast du die UPS-Mail nicht bearbeitet, die ich dir weitergeleitet habe?“. Und ich sagte nur „UPS-Mails haben keine .EXE-Änhange und kommen nicht von tfds.vddseew@hotmail.com“ *seufz*

Hierbei handelte es sich wieder einmal um Vorgesetzte…

Filed under Berufsalltag, Browser, Fun, Linux having No Comments »

Archives Posts

Forget trac and dotproject! Redmine is here.

Juli 2nd, 2008 by Blu:RayNe

Basically the software is much like the well known trac + dotproject with the look of trac, but has least twice the features and also feels to be a faster. But that’s probably the speed benefits Ruby on Rails 2.x.

I wonder why I haven’t read any reviews of Redmine yet. It isn’t yet even listed on Wikipedia, although version 0.1 was releason on the 25th, July 2006. But it is definatly worth checking out or switching ;)

Overview

  • Multiple projects support
  • Flexible role based access control.
  • Flexible issue tracking system
  • Gantt chart and calendar
  • News, documents & files management
  • Feeds & email notifications.
  • Per project wiki
  • Per project forums
  • Simple time tracking functionality
  • Custom fields for issues, projects and users
  • SCM integration (SVN, CVS, Git, Mercurial, Bazaar and Darcs)
  • Multiple LDAP authentication support
  • User self-registration support
  • Multilanguage support
  • Multiple databases support

Demo

Perhaps here is also something worth checking out for alternatives:

Filed under Allgemein having 3 Comments »