Zen Cart Logo
Forums / General Questions / Completely confused about htaccess and SSL

Completely confused about htaccess and SSL

Locked

Views: 2,775

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
18 May 2007, 6:00 PM
#1
grandmaj avatar

grandmaj

Zen Follower

Join Date:
Feb 2007
Posts:
104
Plugin Contributions:
0

Completely confused about htaccess and SSL

I'm so frustrated I could just cry. I thought I was doing well, figured out MANY problems over the past months in Zen without having to bug the folks on the message boards too awful much, and thought I'd have the store open this week. But now I'm starting to fear that after all this time and work I will wind up going back to my old html site with Mal's e-commerce cart (which is truly cumbersome to maintain).

What it all boils down too is, I am absolutely too stupid to understand anything related to the htaccess files, no matter how much I read. I've given up on trying to get a permanent redirect to work and can accept that, but the security issues are something else entirely.

I have read and re-read the Important Site Security Recommendations file, section 7, regarding htaccess. There are already htaccess files in most of the folders of my default Zen installation (version 1.3.7) which I didn't put there, but some of them don't have what the article suggests to put in them, which is;

#.htaccess to prevent unauthorized directory browsing or access to .php files
IndexIgnore /
<Files *.php>
Order Deny,Allow
Deny from all
</Files>

#add the following to protect against people discovering what version your spiders.txt file is
<Files *.txt>
Order Deny,Allow
Deny from all
</Files>

I don't know which of the pre-existing htaccess files to delete, which ones to leave alone, or which ones to add the suggested commands to.
For examples, my Includes folder has an htaccess file that has the "<Files*.php>..." section shown above in it, but none of the subfolders inside of the Includes folder do... does that single htaccess file take care of all the subfolders too then?
The htaccess file in the Admin folder doesn't have anything even resembling the two htaccess commands(?) above in it... so do I add them? The public_html folder iteself doesn't have those two either... does it need them?
There are four folders inside the public_html folder that don't have an htaccess file at all by default... do I need to make one?

I am beyond confused, and I know that there are people on the boards who are going to either ignore this post as a "dumb question" or tell me to read the instructions, but the point is, I have read and I just do not understand it at all.

18 May 2007, 6:18 PM
#2
birdoasis avatar

birdoasis

Inactive

Join Date:
Jun 2005
Location:
Cheney WA
Posts:
1,123
Plugin Contributions:
0

Re: Completely confused about htaccess and SSL

It's ok GrandmaJ, let those tears flow. We all go through this. if you search for my username you'll see where I have completely lost my composure a few times.

That said, I'm going to read the rest of your article to see if I can help.

JP

18 May 2007, 6:41 PM
#3
birdoasis avatar

birdoasis

Inactive

Join Date:
Jun 2005
Location:
Cheney WA
Posts:
1,123
Plugin Contributions:
0

Re: Completely confused about htaccess and SSL

Ok, I understand your confusion. htaccess is a frustrating thing to go through.

It can be easier if you use the back end of your hosting account to redirect. Can you tell me if you use cpanel or plesk, or whatever the backend is called?

Usually there is a redirect button somewhere in there, and then you just have to choose the folder you want redirected, and the folder you want it to redirect too.

If you would like, you can do this with a regular html command in the heading of a file titled index.html.

Create a new html file in your favorite html editor.

After the <head> tag copy this line

<meta http-equiv="refresh" content="0;URL=http://yourdomain/folder/">

So where it says yourdomain is the domain name of your site, and where it says folder is the name of the folder you want to redirect to.

Save that file in the folder you want people to be redirected from.
I'll be back with more about htaccess.

18 May 2007, 7:00 PM
#4
birdoasis avatar

birdoasis

Inactive

Join Date:
Jun 2005
Location:
Cheney WA
Posts:
1,123
Plugin Contributions:
0

Re: Completely confused about htaccess and SSL

Actually I need to know what you want to redirect to, Are you changing the name of the folder, or is this where you want to be sure your sending the user to a secure login?

18 May 2007, 7:09 PM
#5
motor avatar

motor

New Zenner

Join Date:
May 2007
Posts:
42
Plugin Contributions:
0

Re: Completely confused about htaccess and SSL

birdoasis:

Actually I need to know what you want to redirect to, Are you changing the name of the folder, or is this where you want to be sure your sending the user to a secure login?

Could you perhaps help me out here?
http://www.zen-cart.com/forum/showthread.php?t=65981

Thanx

19 May 2007, 3:44 AM
#6
grandmaj avatar

grandmaj

Zen Follower

Join Date:
Feb 2007
Posts:
104
Plugin Contributions:
0

Re: Completely confused about htaccess and SSL

Thank you birdoasis, I actually did have a good cry this afternoon and it really did help quite a bit. :smile:

I use cPanel and the redirect issue was related to a post I had read here that said that everyone has many links to their home page, and if Google sees them you will get penalized for duplicate content. Such as:

mysite.com
mysite.com/index.php
mysite.com/index.php?main_page=index
www.mysite.com/index.php
www.mysite.com/index.php?main_page=index

The rest of the post was way over my head though I tried to follow what they were doing. The best I managed was to successfully get a redirect in place that sent mysite.com to www.mysite.com, but couldn't get anything to work for the other urls.

My huge concern is the security issues and htaccess though because I cannot afford an SSL certificate right now due to some medical bills I've accumulated in the past couple of months. I will be using PayPal for payment processing so my customers' financial info will be secure, but I don't want folks getting into the Zen files and causing my host to shut me down for something they did. I've followed all the security steps exactly as Zen directs (except the SSL), but I'm stuck on the htaccess part.

20 May 2007, 4:34 AM
#7
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: Completely confused about htaccess and SSL

Hi GandmaJ

My huge concern is the security issues and htaccess though
because I cannot afford an SSL certificate right now

Don't sweat this one... there is a huge difference between what SSL does and what the htaccess files do.
If PayPal is your only method of online payments you don't really need an SSL certificate and your customers will still be 'protected', because any CC details they enter will be on the PayPal site rather than yours, as such they'll be utilising PayPals SSL.
I'm even going to go as far to say that having your own SSL could even be detrimental for you, because it means more for you to setup and configure, and if you have any external links on any of your SSL pages your users will get a legitimate 'warning' that not all items are encrypted. Although this is actuall harmeless, it does cause many people to freak out. They are much happy with unencrypted pages without any 'warnings'. At least that is MY experience.

As for what SSL and HTACCESS files actually do... Simply put, SSL merely encrypts the pages being sent across the network, where as
HTACCESS controls what pages are actually accessible.

Cheers
Rod

20 May 2007, 5:50 PM
#8
rwment avatar

rwment

Zen Follower

Join Date:
Apr 2007
Location:
Whitehouse, Texas
Posts:
126
Plugin Contributions:
0

Re: Completely confused about htaccess and SSL

Ok I dont know very much about the htaccess either but I can definitely help with your redirect. I do not use a index.html page for my root folder index I created an index.php home page and it looks like this:

<? Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: <http://www.got-its.com/zencart/>" ); ?> <HTML> <HEAD> <TITLE>Your Title</TITLE> </HEAD> <BODY> <? Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location: <http://www.got-its.com/zencart/>" ); ?>

The problem with redirects is that if it is not done correctly it plays havoc with the search engine bots. Google so far loves this one, in just over two weeks I have 1260 links on Google, I would also recommend using google's HTML method of verification. Obviously you will need to change my domain name and folder for whatever yours is.

22 May 2007, 5:26 AM
#9
grandmaj avatar

grandmaj

Zen Follower

Join Date:
Feb 2007
Posts:
104
Plugin Contributions:
0

Re: Completely confused about htaccess and SSL

Ok, I'm beginning to understand this a bit better (thank you all!).

So if I just leave all the htaccess files that Zen cart installed just as they are, and add nothing more to them, then the site is relatively "safe" ? Do I need to at least add that one command

IndexIgnore /
<Files *.php>
Order Deny,Allow
Deny from all
</Files>

to the htaccess file that is in the admin folder?

22 May 2007, 12:01 PM
#10
rwment avatar

rwment

Zen Follower

Join Date:
Apr 2007
Location:
Whitehouse, Texas
Posts:
126
Plugin Contributions:
0

Re: Completely confused about htaccess and SSL

Well you should probably check with JP but I think he is on vacation. However I don't think that you have to worry about it due to there not normally being any links from the catalog side to the admin side so any spider or bots indexing your site should not find your admin folder anyway.