donderdag 31 december 2009

Rewriting for SEO-Friendly URLs: .htaccess or PHP?

Rewriting for SEO-Friendly URLs: .htaccess or PHP?

maandag 28 september 2009

Force www vs non-www to avoid duplicate content on Google

Recently, it has been talked a lot about Google and duplicate content as well as Google Canonical problems.That is, when you have your site accessible both under your_domain.com and www.your_domain.com. To avoid such problems you can use the following lines in your .htaccess file to force only the www version of your web site:

RewriteEngine on
RewriteCond %{HTTP_HOST} !^www.your_domain.com$
RewriteRule ^(.*)$ http://www.your_domain.com/$1 [R=301]

Please note that the .htaccess should be located in the web site main folder.
The dot in front makes it ivisible so use your ftp client setting to dsplay hidden files..

This will redirect all requests from the non-www version of your site to the www version using 301 Permanent redirect which will make the search engines to index your site only using the www.your_domain.com URL. In this way you will avoid a duplicate content penalty.

When you have also aliases running on your site and you want top keep these intakt, than this system isn't working for you: it is forwarding to a domain.com.

A much nicer way is than this one, which you can just copy/past on all your websites:

RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]

maandag 14 september 2009

SEO and bilingual news items

Having a multi lingual website with news items submitted using Google Sitemaps, you can actually get in trouble when Google indexes pages (with SEO-friendly URI's) in both languages.
Let's look at my case:
I have two istemaps submitted in Google webmastertools, e.g.
My website has for most single news-items two different languages using for each item several fields like header_dutch and header_english. When I decide not to translate an item, I leave the header field of the other language empty, so that item is not displayed.
The problem is that an English someone (based on recoqnized language)clicks on a Dutch link in the SERP (Search Engine Result Page):
I have the following possibilities:
  1. Show the Dutch article
  2. Show the English translated article (same record id) and decide what todo if there is no English translation for that article.
I find it much user friendly to show the English article if the system was able to recoqnize the user's language. (I do that using a combination of the PHP command $_SERVER["HTTP_ACCEPT_LANGUAGE"] and the TLD but that is another story)

First, look at my SEO_friendly sitemap links:
English :  http://www.digizaal.nl/nieuws/dick_koopmans_sails_across_the_ocean_in_ostar_09.html
Dutch : http://www.digizaal.nl/nieuws/dick_koopmans_zeilt_ostar_race.html

htacccess directive:
RewriteRule ^nieuws/*([^/]*).html /nieuws/meer/?header=$1&lan=dutch [QSA,L]


In this case I used to follwing php procedure:

 if($_GET['header'])

{
$seo="SELECT id FROM $table WHERE header_english LIKE '%$get[header]%' OR header_dutch LIKE '%$get[header]%' AND users_id>'0' AND online='1' ";
$result['bericht']=pw_dbtoarray($seo);
$_GET['id']= $result['bericht'][1]['id'];


} 

Solution 2: using language dependent URI
In the following solution, I use the words "news" or "nieuws" in the sitemap URI.
English : http://www.digizaal.nl/news/dick_koopmans_sails_across_the_ocean_in_ostar_09.html
Dutch : http://www.digizaal.nl/nieuws/dick_koopmans_zeilt_ostar_race.html

With the following htaccess , I can easly switch the language:
 
RewriteRule ^nieuws/*([^/]*).html /nieuws/meer/?header=$1&lan=dutch [QSA,L]

RewriteRule ^news/*([^/]*).html /nieuws/meer/?header=$1&lan=english [QSA,L]

The only problem with this solution is :
Because This solution is using hard-coded directories to decide the language, the language switch on my site is not working anymore: The GET statement ?lan=english would not override the htacess directive which can only be solved to let the language switch pointing to the root or folders like /english/ and /dutch/

woensdag 2 september 2009

The importance of domain names containing keywords


The usage of extra domain names to get your site higher ranked Google is lately a pretty popular technique which is not always working out since it can be seen as spamming the Google directory.
To prevent this from happening, we developed a technique that uses the type of name to decide whether it will be used for which language, country plus we change the page content slightly.
Looking at the picture we can demonstrate pretty good what kind of results a domain-name containing keywords can do:
On UK's localized Google page, we searched for "Congress furniture".
The domain name we are targeting (jmt-uk.co.uk) is ranked here at second; but at first we have a domain-alias "exhibitrent.com" popping up for the Dutch JMT site (jmt.nl). apparently, Google connects "exhibit" here with "congress" and decides that exhibitrent.com should be higher, even while exhibitrent.com doesn't have any back links at all.

To have the domain name alias working, we need to setup your domain name as an alias into our server, not just a redirect. To prevent being banned out of Google, directly some changes need to made into your CMS/Framework, where page title, description and some content need to be updated. We use this system for our multi national client JMT where only one website is being used to serve several countries with several languages, currencies, and varying stock.
The total amount of domain-aliases is 50+.

dinsdag 25 augustus 2009

Explosion proof heater

Finally, we got ourselves a safe heater using an explosion proof heater.
Provided with a maximum temperature thermostat with manual reset and a water temperature thermostat till 80 0C.
On top of that we purchased some kantoormeubelen and hired a few chairs for the exhibition

zaterdag 15 augustus 2009

Furniture Hire London



I wonder when I'll type here Furniture Hire or Conference furniture rental will boost the ranking of JMT-uk for certain search engines.

The rental RSS feed of this site is huge because it contains all articles.
The events RSS feed of this site is pretty complete and can be used on igoogle or Google reader

donderdag 13 augustus 2009

Evenementen- techniek Den Haag

Enkele maanden geleden hebben we een evenemententechniek website gelanceerd voor een AV verhuur en installatie bedrijf in Denhaag en omgeving.
De website biedt een uitgebreide producten catalogus met verlichting en audio/video verhuur artikelen.

dinsdag 10 maart 2009

Fonts for the People


Het maken van Links in sIFR (www.mikeindustries.com/blog/sifr/) kan problemen geven Hoewel de door mij gemaakt sites van Buromex kantoormeubelen , contest brokerage en Human Office ging dit echter prima.

Bij de methode die gebruikt wordt in deze  digizaal site ging Flash replacement echter minder gemakkelijk en vonden wij in Cufón (http://cufon.shoqolate.com/generate/) een waardige vervanger.



Het gebruik van pure tekst in html heeft vooral zoekmachine technisch een must. (Simpelweg gig of jpg afbeeldingen gebruiken uit Photoshop is uit den boze) en beide systemen vereisen dat ook: 

Een CSS instelling maakt deze tekst onzichtbaar zodra de vervanging heeft plaats gevonden.



Het invoegen van de speciale letters gaat via een javascript, wat -afhankelijk van de versie van de browser van de bezoeker- met VML of het <canvas> element.

en.wikipedia.org/wiki/Canvas_(HTML_element)




Het Purple theme op Digizaal is verre van OK: Hover werkt nog niet,  en ook Chrome en Safari doen meer dan firefox en IE8.

donderdag 26 februari 2009

Website for CAd/CAm software firm


22 February 2009 ,

Alibre is 3D CAD Design and CAM production software. For the Dutch distributor of Alibre we converted a design into reality.

The frontpage shows a flash slideshow with pictures which can be updated. The functionality of the site consists of the webpages module plus news, FAQ and photo gallery.

The webpages module we provided is powerfull enough to feed all pages for nthe both programs (Design and CAM) they display on the website.
link for extra info: www.alibredesign.nl

Digizaal Webdev renewed site

Last week pretty busy in totally rewriting the digizaal homepage
Which supports now unlimited languages 9only Dutch and English implemented)..
What what a lot of work!, The News, projects and all the services had to be written in two languages: I totally forgot about this kind of work.
Uding my own CMS software, gave me a couple of translation idea's which I quickly wrote, and they are doing perfectly their job.

Right now I work on some extra stuff like Search engine friendly URL like:
www.digizaal.nl/news/google
which fetches the news item about google.

vrijdag 31 oktober 2008

UDC Homepage is now multi lingual


Without making any changes in the Flash sources but by just controlling the actual XML output using a smart MYSQL query, I changed the dutch-only page to a English/Dutch web page using $_GET parameters.
already for months I made the CMS multilingual for event news, which was onnly used by external parety sites like fullonferry.com and dancevalley.com , and now it was time to role it out:
event news, party-news, party-concepts are all multi lingual.
United Dance Company

There was a major problem with just one flash applet which stayed showing its content in Dutch (the default language) where I really had to edit the action-script: it was invoking its XML from a sub domain clockwork.udc.nl (clockwork is the old original designer) instead of just www.udc.nl, (although this sub domain was pointing to the exact same website).. Because it is another domain, simply the session cookies where not seeing this as the same session, so the system was giving that particular XML request the default language (dutch)
Next step is probably using the default language using the settings of the client by $_SERVER[accept_language]..

zaterdag 25 oktober 2008

Low budget Hotel in Cannes


The last few days I have been staying over at a friend in Cannes, who works in a very cosy little hotel in the centre of Cannes.
Cannes is situated on the south coast of France, where the temperature is very nice during this time of the year: while Amsterdam has nights of 3 degrees Celsius, it can be here (at 1:00 AM) 19 degrees Celsius in october I noticed..

I stayed a couple of days in this realy nice low budget Hotel in Cannes where I could hook up on the net for free, so I was able to do my work using my first Laptop, a 17" Acer.
I fully recommend this Hotel in Cannes where the people are so nice and open..

maandag 13 oktober 2008

Flashy artist websites

Back in 2002 I started to create my first Flash werbsites which had a CMS
I started with www.newhouseart.com and slowly evolved to a better CMS with a standardized flashvars output.
This resulted in Margje Teeuwen Art and Juan Bravo/ Mexia Kunst which has also Juan Art.
Now, - far too late- I converted my output from flash vars to XML, starting for UDC with the Gallery for Gerard Joling (a singer).

I soon will make these galleries available free for download to get some more visitors and fans..
The object is quite small in this blog, the content in this flash will adopt the width so the silder will look much better when more wide..





maandag 6 oktober 2008

Select country and language(s)

A growing number of customers want to expose their site to other countries, especially here in Europe where I work at the moment.
First problem: support of other languages.
Our framework works with 100% HTML templates, which are selected by their name, based on a the selected language, in our case $get[lan]. so, we have templates like english.html and dutch.html. When our website is 100% dynamic, I often use just ONE template for all languages and place the dynamic terms - like for example (sub) categorynames- in a translate-function, called dz_translate("hello") or dz_translate ("hello", dutch) where dutch is the active language so might be forgotten..
This quickly looks for the text in a translation-database and sees if there is a translation known for "hello" and returnes the translation. If there is no translation, it returns the same word but adds the word" hello"in the database so it can be translated by the admin-editor.

function dz_translate($input,$language='',$table='translations',$nfield='name_org')
{ global $result,$get;
if(!$input) return; else trim($input);
if (!$language) $language=$get['lan']; // * Set Def lan.
if(!isset($result['translate'])) $result['translate']=pw_dbtoarray("select * from $table",'*',$nfield);
if(!isset($result['translate'][$input][$nfield]))
{ mysql_query("insert into $table set $nfield='$input',online='1'"); } // * Not Found at all: Add tot database $table
$return=$result['translate'][$input][$language]; // * LookupTranslation
if($return) return htmlentities($return); else return htmlentities($input); // * Found translation else Not Found Translation
}


This can cause a slow website so it is adviceable to create an array vewfore the page is loaded, incase several trranslations have to be done in one page.
Second problem: Which products and prices are shown
Many companies cannot offer the exact same products for the exact same price: so there we again: how can this be solved for smaller companies ?
Instead of giving ech country their database, it is much more manageable if we create a database with products and we create extra fields for description (in all available languages) , availablity (for each country) and prices (for each country in their own currency)
so:
description_dutch, description_english, description_french, description_spanish, etc
and online_fr, online_uk, online_es, online_nl
and also:
price_nl, price_uk, price_fr, price_es etc (where uk, fr,es stand for UK, france, Spain)

with the basic variables $get[lan] and $get[country] we now have all the ingredeints to create the right MySQL query:

SELECT *, description_$get[lan] AS description, price_$get[country] AS price
FROM catalog
WHERE online_$get[country]='1'


Here we have the basics of multilingual, multi currency and multi national sites.
There more problems to tackle which i might write about in a later post, like:
  • auto selecting a language based on browser and operating system, but also on the default langiage for a country
  • selecting the products when some one from SPAIN is visiting a UK website

zondag 28 september 2008

How to create a tag-cloud



Lately it is very hot to have a tag-coloud and this morniong I had a fresh idea how to create it out of the subcategorie and sub-subcategory name I use for NewClassicToys.
I think that using these names a site looks much fuller becasue such a cloud is 100% full with words that the visitor (toy-shop owner) understands. Also It will really work for google-indexing of usefull keywords. :)


// first, I create a multidimension array called "cloud"
$result['cloud']=pw_dbtoarray("SELECT $waarde as waarde, count(id) AS aantal FROM catalog
$countrysel WHERE users_id>'0' AND $waarde!=''
GROUP BY $waarde ORDER BY $waarde ");
// I need to have the highest value.
$total_count=findmax($result['cloud'],"aantal");
$biggest_font_size = 39;
$smallest_font_size = 8;
$multiplier =$biggest_font_size -$smallest_font_size;

// This while-loop creates an extra column called fontsize which I can use for styling the HTML.
// instead of that, you can replace the line with $result['cloud']... with
// echo ' $result[could][$nummer][$waarde]'



while ($nummer <= $total_count) {
$result['cloud'][$nummer]['fontsize'] = round(($result['cloud'][$nummer]['aantal']/$total_count)*$multiplier)+$smallest_font_size;
$nummer=$nummer+1;
}

Boating to a facebook event

This sunday morning i woke up far too early : 6:55 AM is just outraguously even for my life-style.
Lately I noticed that I wake up earlier when I get wasted of alcohol the evening before, and that is what I did: yeaterday, after a nice boat-trip to the NieuwenMeer > Nieuw en Meer > Exposition "Malkovich", a beuatifull expo of architectural innovations of atelier-designs, hosted by Ayelet (old Zirk crew) and friends.
I was invited using a facebook event: In The netherlands FaceBook is not used very common, everybody is using Hyves istead..


On our way down there jons and I picked up Daniel (zem114) who told us he got busted for grafitty in paris and was jailed for that for 17 hours), Bart, Hylke, Lenne and her new Boy friend Tim.

The Malkovinch expo was very interesting: there were eight winning designs build in a 1:2 scale, so in most of them you could even walk into!

woensdag 24 september 2008

Smashed Lemon street wear


Yesterday evening I had Nachman over here, a formal client that I thought I lost since he broke up with his business partner Yoel, who immigrated to Barcelona and took his domain-name smash-wear.com to a spanish webdesigner.
Turned out to be that he is still going strong, cleaned up the mess (and debts) and want to be number one again: perfect client for me because I like to work for the underdog, as lomng as they are winner-types and this one looks like one to me.
He started by claiming a domain name, I bargained a price for a photo gallery website with CMS, and I had just the right gallery software for him lying around, based on a open source flash script working with XML.
I already figured out how my framework could create the exact XML, so after he left, I took a cup of coffee and worked till 2 AM, incl. the Xhtml and analytics account, uploading pictures in teh CMS etc.

This morning I found a cute logo, which isnt a smashed lemon but a heart shaped lemon but what I think could fit perfect with the name.
"Smashed" has a negative annotation but when it is smashed to a heart shape, it is kind a nice...

I hope they like it.... when he will see it .. at the moment of this writing his ISP did not index his new domain name yet so nobody would think I didnt work fast :)
here is the website: Smashed Lemon
The CMS gives him the possibility to have unlimited categories which are appearing on the top as TABS, using my basic CSS shit.
I created/modified the flash so it will work with transparency, so later I can have some random background-colors attached to the categories.

I like these kind of jobs: a whole site incl domainname in less than 4 hours flat.

maandag 15 september 2008

More domains for JMT

To have higher scores in Google, I claimed some extra domains for JMT


based on important search keywords, and offcourse to take them before someone else does:
these links are displayed so google hopefully index them ..

DESIGNFURNITUREHIRE.CO.UK

EXPO HIRE
STAND FURNITURE
RENT EXPO FURNITURE
EXPO RENT
SHOWCASE FURNITURE

EXHIBITION FURNITURE HIRE.COM
EXPO FURNITUR EHIRE.COM


The following I will have pointed to JMT-int main site
RENT EXPO FURNITURE
EXPO-RENT.COM
CONGRESS FURNITURE
EXHIBIT RENT

This one is for france:
EVENEMENTMOBILIER.COM


Technically, I point all these domains to my server, where I setup the domains as ALIAS under the single website I developed for this client.
(for The Netherlands, UK, france, Spain and a dozen more there is ONE SITE operational, supporting 5 languages , 3 currencies, and for each country its own stock and prices.
internally, we use two really important variables, $get[lan] and $get[country]

// *** DOMAINS/HOSTS Set get country and (Def) language depending on HTTP HOST

if ($_GET['host']) $_SERVER['HTTP_HOST']=$_GET['host']; // * !voor testen bijv: /?host=www.jmt.fr werkt ook!
// Switserland
if ($_SERVER['HTTP_HOST']=='www.jmt-mietmobiar.ch') { $get['country']='ch'; $get['lan']='german'; }
// Netherlands
if (!$get['lan'] or !$get['country']) {
if (strstr($_SERVER['HTTP_HOST'],'jmt.nl')) { $get['country']='nl';$get['lan']='dutch'; }

//Belgium
if (strstr($_SERVER['HTTP_HOST'],'jmt.be')) { $get['country']='be'; $get['lan']='dutch'; }

// United Kingdom
if (strstr($_SERVER['HTTP_HOST'],'uk')) { $get['country']='uk'; $get['lan']='english'; }
// France
if (strstr($_SERVER['HTTP_HOST'],'jmt.fr')
or strstr($_SERVER['HTTP_HOST'],'mobilier')) {
$get['country']='fr'; $get['lan']='french';
}
//Spain and Catalonia
if (strstr($_SERVER['HTTP_HOST'],'jmt.es') or strstr($_SERVER['HTTP_HOST'],'ambiplan.com')) {
$get['country']='es';$get['lan']='spanish';
}

if (strstr($_SERVER['HTTP_HOST'],'germany')) { $get['country']='de'; $get['lan']='german'; }
}
// ** Default Page when no domain or host is given
if(!$get['country']) { $get['country']='nl'; }
if(!$get['lan']) { $get['lan']='english'; }




Schaffenburg product chooser

on this link I develop live an iTunes/iPhone Gallery type of flash based on a CMS.
The iTunes slider on the bottom will be replaced by pictures, The Xml that it read is created dynamicly by the Framework based oin the category that has been choosen.

Each item represents a 470px wide bitmap, and description/and name, categroy and -more inpoertant- a small transparent bitmap or SWF flash file.

I just finished the solution of having the transparency wmode working on Linux by also dynamicly changing the html style background color in the swfobject tag.

Still some small things have to be finished, like for example the distance between the thumbs could be smaller.

maandag 8 september 2008

nieuwe site voor Roldeurkast fabrikant

Schaffenburg een fabrikant van roldeurkasten heeft mij opdracht gegeven een neiuwe site te omntwikkelen met heftige flash die geinspireerd is op de zg. itunes album browser.