Author Topic: [SOLVED] Checkout URL has domain name twice  (Read 9296 times)

jbavington

  • Beginner
  • *
  • Posts: 24
[SOLVED] Checkout URL has domain name twice
« on: April 28, 2010, 17:57:15 pm »
Hi there,

I'm using VM 1.4 and Joomla 1.5.15

For some reason, when you're at the view cart page, the checkout URL at the bottom is:

http://www.tracyswinejellies.comhttp//www.tracyswinejellies.com/index.php?page=checkout.index&ssl_redirect=1&option=com_virtuemart&Itemid=1

The domain name appears twice and the second instance is missing the colon following http.

In VM Admin, Site URL is set to "http://www.tracyswinejellies.com/" and Secure URL is set to "https://secure.tracyswinejellies.com/"  Our SSL cert is setup at secure.tracyswinejellies.com

Has anyone else run across this issue?

Thanks.

Jason

jenkinhill

  • UK Web Developer & Consultant
  • Global Moderator
  • Super Hero
  • *
  • Posts: 27735
  • Always on vacation
    • Jenkin Hill Internet
Re: Checkout URL has domain name twice
« Reply #1 on: April 28, 2010, 23:18:50 pm »
You usually need to use www. for siteurl and secureurl. I can't check your site as itn seems a login is required.

You seem to be using .htaccess to force the url https://secure.tracyswinejellies.com/  to go to https://www.tracyswinejellies.com/
Kelvyn

Jenkin Hill Internet,
Lowestoft, Suffolk, UK

Unsolicited PMs/emails will be ignored.

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum

Currently using VM 3.8.2 10325 on Joomla 3.9.18 PHP 7.3.18

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: Checkout URL has domain name twice
« Reply #2 on: April 29, 2010, 09:29:34 am »
Make sure in your URL and SECUREURL settings in VM config both have a "/" after your domain. Not having this will cause your problem.

http://www.your site.com/

jbavington

  • Beginner
  • *
  • Posts: 24
Re: Checkout URL has domain name twice
« Reply #3 on: April 29, 2010, 15:07:38 pm »
You usually need to use www. for siteurl and secureurl. I can't check your site as itn seems a login is required.

You seem to be using .htaccess to force the url https://secure.tracyswinejellies.com/  to go to https://www.tracyswinejellies.com/

Hi,

Most of the site is non-public right now, as it's being build.  I've set up a test account with user "test" and password "test".  You can then see how the checkout URL is being displayed.

I have trailing slashes on both the Site URL and Secure URL.  My hosting provider said "the URL secure.tracyswinejellies.com is bound to the same content folder as the www so it will load the exact same content - however I'm guessing that the site content itself is forcing www.tracyswinejellies.com"

I don't have a ".htaccess" file set in the root folder.  So it's all a bit of a puzzle.

Thanks for any help!

Jason

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: Checkout URL has domain name twice
« Reply #4 on: April 29, 2010, 21:27:58 pm »
I see. I did not notice you had a different cname for your domain. (secure vs www).

I would do this.
Set your URL to:
http://secure.tracyswinejellies.com/
and SECUREURL to
https://secure.tracyswinejellies.com/

Create a variable in your Joomla config such that:
var $live_site = 'http://secure.tracyswinejellies.com';

Then enable your htaccess.txt, renaming to .htaccess
In .htacecss turn on mod_rewrite (uncomment)

Then add this code at bottom of .htaccess to redirect all non www and www requests to the secure cname:
###### Added by Forrest to insure AJAX cart works by force of www
#
RewriteCond %{HTTP_HOST} ^tracyswinejellies\.com
RewriteCond %{HTTPS} =on
RewriteRule .* https://secure.%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTP_HOST} ^tracyswinejellies\.com
RewriteCond %{HTTPS} !=on
RewriteRule .* http://secure.%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
#
########## End - Addition by Forrest

jbavington

  • Beginner
  • *
  • Posts: 24
Re: Checkout URL has domain name twice
« Reply #5 on: April 30, 2010, 18:17:36 pm »
Hi Forrest,

I've made the changes you mentioned and set mod_rewrite to yes in Joomla's global config.  And a funny thing happened...

Everything works!!!  Thank you very much for your help.  I think I got a few grey hairs from this one.

Take care.

Jason

Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: [SOLVED] Checkout URL has domain name twice
« Reply #6 on: April 30, 2010, 22:20:25 pm »
Excellent. The one thing I would double check now... only if you have the ajax cart enabled... is the add-to-cart function for products. Just make sure that works ok.

jbavington

  • Beginner
  • *
  • Posts: 24
Re: [SOLVED] Checkout URL has domain name twice
« Reply #7 on: April 30, 2010, 22:58:19 pm »
Yes, you're right.  The AJAX wouldn't work if someone came from "www.....".  I have a Canonicalization plugin installed that forces the url to "secure......" so all is well!

Thanks.

Jason


Forrest

  • Full Member
  • ***
  • Posts: 1972
  • Me and my baby
    • Web Developer
Re: [SOLVED] Checkout URL has domain name twice
« Reply #8 on: April 30, 2010, 23:13:59 pm »
k