Follow me
To me it looks like this may be your first time here. If you like why not Follow me.
You might also like to find out a bit more about me
OsCommerce making all the non www pages be www
May 7th, 2007Well I have been busy as ever, this time wrestling with OsCommerce for my wifes online business….
By default good old OsCommerce likes to present itself in the non www. way but my change to the urls means i have em all as www. now.
So a simple rewrite later and we are good to go… except the fucking admin section now doesnt work, i hate rewrites…
OK here is the code (pop it in your .htaccess file in the root of the domain.) for anyone who wants to make sure their oscommerce store only shows as www.domain.com pages and not domain.com and so you can still use the admin section…
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.somedomain\.co\.uk [NC]
RewriteRule ^(.*) http://www.somedomain.co.uk/$1 [L,R=301]
RewriteBase /admin/
RewriteCond %{HTTP_HOST} !^www\.somedomain\.co\.uk [NC]
RewriteRule ^(.*) http://somedomain.co.uk/$1 [L,R=301]
Also remember to tell Google via webmaster tools that you want then to only use the www. pages..
About SEOidiot
Hi my name is Paul Madden and I am a UK SEO based in Lancashire, for years I have been cursed by the nickname SEOidiot which started life as a form of abuse from someone but you need to decide for yourself how accurate the term is.
Quotes about me
Julie Joyce
Link building expert and blogger

