News:

Looking for documentation? Take a look on our wiki

Main Menu

Add to cart not working with www

Started by benjislav, June 08, 2013, 19:43:31 PM

Previous topic - Next topic

benjislav

Hello,

I have the following problem. button add to cart does not work when the link is with WWW.
There is no problem without WWW, works. I want to work with WWW.
The problem is recent, I use Joomla 2.5.11 and VirtueMart 2.0.20b.

Please help!


Milbo

I am sorry, I dont know. I think it is connected to your joomla/server settings.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

beardedhobo

Hi Benjislav,

you can use htaccess to rewrite the URL so if a visitor enters www.yoursite.com it will rewrite it to http://yoursite.com therefore it will work.

To do this open up the file htaccess in your joomla root and add the following:

#Rewrite http://yoursite.com to http://www.yoursite.com
Rewritecond %{http_host} www.yoursite.com [nc]
rewriterule ^(.*)$ http://yoursite.com/$1 [r=301,nc]


don't forget to change yoursite.com to your domain.

Not ideal from SEO purposes as using the www is better but this is the only way I can get it to work for now :(

Good luck!


Milbo

Thanks for the htaccess, but
Why it is better to use www? I think that is an urban legend. WWW was a marketing idea. The idea was to have different subdomains for different services, but we solve that usualy with the ports directly. There is no need to have www.domain for http, ftp.domain for ftp and so on.
Google does not really care if you do it so or so http://support.google.com/webmasters/bin/answer.py?hl=en&answer=44231
This guys says the same as me http://www.sitepoint.com/domain-www-or-no-www/

Here an explanation how todo it http://www.affilorama.com/site-building/url-canonicalization
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/