SEO Addon is causing any https pages to 404

Hi everyone. I’m using version 2.1.1.



My problem is this: when I enable the SEO addon, any link to an https page that runs through the shopping cart (and, thus, through the SEO addon) 404’s on me. Any links to non https pages work fine with the SEO addon.



I’ve combed the knowledge base and the forums for an answer. I’m sure there’s a simple way to edit the htaccess file to compensate for this but every post that even comes close to this issue has not yielded results for me.



Can anyone help me?

[quote name=‘mike_the_boardgamer’]Hi everyone. I’m using version 2.1.2.



My problem is this: when I enable the SEO addon, any link to an https page that runs through the shopping cart (and, thus, through the SEO addon) 404’s on me. Any links to non https pages work fine with the SEO addon.



I’ve combed the knowledge base and the forums for an answer. I’m sure there’s a simple way to edit the htaccess file to compensate for this but every post that even comes close to this issue has not yielded results for me.



Can anyone help me?[/QUOTE]



Cart and checkout do not use SEO.

Yes, but every “form” does.



“Contact Us” 404’s. All of the other forms where people need to submit specific information via email through a form all 404.

I am certain you have already done this, however, After you enabled SEO, did you clear your CS-Cart cache?



(I am so sick of mentioning, or reading “Clear Cache” !) :smiley:

Clear cache,:rolleyes:

Yes. I’ve cleared my cache so many times I’m sick of it myself.



Here’s the problem: ANY page that involves https instead of regular http (read that as any form where I’ve specified that the form is secure through SSL as well as any time when one views one’s cart contents) creates a situation where any link to any part of my website that isn’t https causes a 404 issue whenever the SEO addon is enabled. Essentially the website is trying to stay within https file paths while using the search engine friendly urls and it’s causing 404 errors.



This even includes the “Continue Shopping” button when someone views their cart and includes the basic links to categories in the menu on the left side of the page if someone is simply viewing their cart.



So, I’m essentially in the position of having to choose between having the SEO create more search engine friendly URL’s for my site, or have the SSL encrypt the connection for checkout. This seems like a stupid situation to have to be in because there’s no way I would choose to have the SEO enabled if it compromised security for my customers. So, why have it in the first place if it doesn’t allow for a mixture of secured connections and non-secured connections for the cart?



Is there a way to compensate for all this in the htaccess file? I sure hope so because I’ve been at this for a while and I’m starting to lose my patience with the process.

[QUOTE]Clear cache :rolleyes: [/QUOTE]



Alright fine John, I am just gonna go get ready to watch the Pittsburgh Steelers destroy the Baltimore Ravens in the NFL playoff game! :o

[QUOTE]no way I would choose to have the SEO enabled if it compromised security for my customers. So, why have it in the first place if it doesn’t allow for a mixture of secured connections and non-secured connections for the cart?[/QUOTE]



Don’t worry, this is not the standard behavior to expect, it is just that you have “something” setup incorrectly which is causing this issue on your site.



I would try uploading an “unmodified” version of your .htaccess file from the original CS-Cart download to see if the problem is in this file.



Also, double check your http/https settings in your config.local.php file



Also, there is a setting within your admin panel to “Remain in secure mode after first visit”, I would make sure this unchecked until you have things working.



Hang in there!



Also, as painful as this is to mention, this situation sure sounds as if your cache is not “actually” being cleared! I prefer to access my site via FTP and then delete the entire contents within my /var/compiled/ and /var/cache/ folders, then you know for certain all has been cleared and will be re-compiled properly.

Disabled SEO. Reuploaded my original htaccess file. Cleared Cache. Deleted files in var as you specified. Still 404ing on https pages or when moving from https pages.



I dont’ have the entire site as https checked either.

Also, IF you have Smartoptimizer installed, don’t forget to also clear out the contents within your /smartoptimizer/cache/ directory

Don’t even know what that is. :slight_smile:

Open up your config.local.php file, make sure your url’s are entered as shown here (replace with your actual site url exactly as shown):


// Host and directory where software is installed on no-secure server
$config['http_host'] = 'www.yoursiteurl.com';
$config['http_path'] = '';

// Host and directory where software is installed on secure server
$config['https_host'] = 'www.yoursiteurl.com';
$config['https_path'] = '';

That configuration doesn’t work for me. It creates errors when trying to go to https. Here is how I have to have it set up for it to work (the seo addon aside)



$config[‘http_host’] = ‘www.mydomain.com’;

$config[‘http_path’] = ‘’;



// Host and directory where software is installed on secure server

$config[‘https_host’] = ‘secure1111.hostgator.com’;

$config[‘https_path’] = ‘/~username/’;



Thoughts on what I can do about it?

[quote name=‘mike_the_boardgamer’]That configuration doesn’t work for me. It creates errors when trying to go to https. Here is how I have to have it set up for it to work (the seo addon aside)



$config[‘http_host’] = ‘www.mydomain.com’;

$config[‘http_path’] = ‘’;



// Host and directory where software is installed on secure server

$config[‘https_host’] = ‘[COLOR=“Red”]secure1111.hostgator.com[/COLOR]’;

$config[‘https_path’] = ‘[COLOR=“Red”]/~username/[/COLOR]’;



Thoughts on what I can do about it?[/QUOTE]



Why is it set up like that? Where exactly is the location of your SSL cert?

That’s the location that Host Gator told me it was at. It’s a shared SSL certificate (if that matters).



This must be why the urls are 404ing but I don’t know what to do to change this setup.



Any ideas?

Yes, it’s more than likely your problem. I don’t have any experience with shared SSL but I recall reading one of SCombs post and having to edit a file.



Edit: Or you could just get your own.

[QUOTE]That configuration doesn’t work for me. It creates errors when trying to go to https. Here is how I have to have it set up for it to work (the seo addon aside)



$config[‘http_host’] = ‘www.mydomain.com’;

$config[‘http_path’] = ‘’;



// Host and directory where software is installed on secure server

$config[‘https_host’] = ‘secure1111.hostgator.com’;

$config[‘https_path’] = ‘/~username/’;



Thoughts on what I can do about it?[/QUOTE]



Yeah, WOW!



You really just need to buy your own SSL cert & have it installed on your hostgator site, they are very inexpensive these days. Look at all of the time this has already cost you trying to make a half-baked solution work, shame on you for even considering a shared ssl ! :smiley:



(And then clear your cache again… Lol)!

Hookay, sooh, armed with the info from our conversation, I called Hostgator back and found my solution. It’s dirt simple. Here it is. With the config.local.php setup that I had, all I had to do was change one line of code in the htaccess file.



Take this line of code:



RewriteBase /



and, instead, make it this:



RewriteBase /~username



This fixes all of the http to https and back issues.



Taaa, daaa!

[quote name=‘mike_the_boardgamer’]Hookay, sooh, armed with the info from our conversation, I called Hostgator back and found my solution. It’s dirt simple. Here it is. With the config.local.php setup that I had, all I had to do was change one line of code in the htaccess file.



Take this line of code:



RewriteBase /



and, instead, make it this:



RewriteBase /~username



This fixes all of the http to https and back issues.



Taaa, daaa![/QUOTE]



I would think that the http pages would now 404 but if it works…

[quote name=‘The Tool’]I would think that the http pages would now 404 but if it works…[/QUOTE]



I would have thought the same thing but they work just fine. I’m just glad it’s over and that I learned a few things along the way…



…now off to go clear my cache again… :slight_smile: