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..
Related posts:
- Change your Wordpress title tags
- 301 to a sub directory – an interesting experiment
- Reasons why cachechecker didnt show any links
- OK Confessional time I suppose
- Making the Wordpress search functionality better
4 Responses to “OsCommerce making all the non www pages be www”
Leave a Reply
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
Vyv James - Distribution expert and former general manager for 3M UK


oscommerce is a real pain, unless you use the community contributions.
yes i agree – and even then its coded very strangley
yes i agree – and even then its coded very strangley – very very strangley
very very very very strangley