When accessing a website (on a third party server - so my scope for
modifying the configuration is limited) in some circumstances
the "www." prefix gets removed.
These circumstances appear to be:
if I access
http://www.mysite.co.uk/index.html the page loads and the
address bar shows exactly that.
if I access
http://www.mysite.co.uk/ the index page loads and the
address bar shows exactly that.
if I access
http://www.mysite.co.uk (i.e. no trailing slash or
filename) the index page loads and the address bar shows
http://mysite.co.uk/ (i.e. the trailing slash has been added but the
www. prefix has gone).
This is causing the Ecommerce package I use some difficulties with
Cookies.
Suppose a cookie is written when the site address is
www.mysite.co.uk
If this is later accessed by an address without the
www. prefix (i.e.
mysite.co.uk) the cookie data seems to get out of step by 4 characters
and is effectively unusable.
Is there any way to force the server to translate any accesses to
mysite.co.uk/... to become
www.mysite.co.uk/... or to prevent the
server changing
http://www.mysite.co.uk to
http://mysite.co.uk/
I think using rewrite engine in htaccess might offer an answer, I've
had a go without success (possibly because I'm struggling to
understand the rewrite syntax - is there a complete idiot's guide
anywhere?).