Zen Cart Logo
Forums / Installing on a Linux/Unix Server / htaccess files help please

htaccess files help please

Locked

Views: 6,666

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
4 Apr 2009, 8:11 PM
#1
pasb avatar

pasb

New Zenner

Join Date:
Mar 2009
Location:
Essex (UK)
Posts:
71
Plugin Contributions:
0

htaccess files help please

After installing Zen cart I am going through the STEPS IN SECURING YOUR ZEN CART STORE

I am a little confused about section 8 Using htaccess folders to protect against snooping.

I have read it to say that files with only index.html in would be better if these all had htaccess files in with the suggested code..

Am I going wrong here, this is a fresh install with no added folders, do I need to add to what is already there and how as I don't want to start adding files in places there is not any need for.

Please can someone advise about this and if I add new folders do these need both or one of these files in to protect then also.

I am not using my direct domain at present will if I do have to use additional index.html and htaccess folders, will these have to be altered one the domain is directed at the new site?

Cheers
Paul

4 Apr 2009, 8:24 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: htaccess files help please

A default install has these in place as long as one does not remove them Check the area about securing your site

4 Apr 2009, 9:01 PM
#3
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: htaccess files help please

If you open up one of those index.html files, you'll see they are essentially empty:

<html>
  <head>
    <title></title>
    <meta content="">
    <style></style>
  </head>
  <body></body>
</html>

An .htaccess file will typically contain:

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

In a standard install, these will be included automatically, and if you later "move" your webshop to another server, these little files go with it and don't (generally) need changing. Sometimes, servers are set up differently, and .htaccess can be problematic - particularly on windows servers.

Host on a linux box, and ZC is as rubust as fort knox.

5 Apr 2009, 10:38 AM
#4
pasb avatar

pasb

New Zenner

Join Date:
Mar 2009
Location:
Essex (UK)
Posts:
71
Plugin Contributions:
0

Re: htaccess files help please

Hi,

Thanks for replies, much apreciated.

You said that all is in place for install,which is all good so no probs.

So when on the (Securing your zen cart store FAQ section) Folder purposes, It says about adding htaccess if site supports it, should I do this if I can and which on the previous section of the 2 (Use htaccess files to protect against unwanted snooping) would need to be placed within this file.

You help would be much appreciated

thanks
Paul

5 Apr 2009, 2:59 PM
#5
pasb avatar

pasb

New Zenner

Join Date:
Mar 2009
Location:
Essex (UK)
Posts:
71
Plugin Contributions:
0

Re: htaccess files help please

Hi,

re previous comment also

this is what I am reffering to

https://www.zen-cart.com/tutorials/index.php?article=73

Basically, is what I am thinking correct?:huh:

In the How to secure your Zen cart store it states if you can use htaccess files you should use something like the 2 snippets of text shown.

You said all is done on the fresh install, but the additional precautions like this is confusing me.

is there a need to add more htaccess like suggested, if so is that all I need to place in the file called htaccess.txt and place this where there are index files to make it more secure?

Do I place htaccess folders where there are not any to add security?

Please help, all I want to know is do I don't I and how, then I will be finished, anyone I would be grateful.

regards
Paul

5 Apr 2009, 3:23 PM
#6
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: htaccess files help please

You should:

  1. Rename the Zen Cart admin folder via FTP

  2. Within the admin/includes/configure.php file change the entries for /admin/ to /new-name/ (3 of them)

  3. After you have done that use the Password or Directory Protection feature in your Web Hosting control panel (cPanel, Plesk, Ensim etc.) to protect the newly renamed 'admin' folder with a User Name and Password. This feature will create the .htaccess protection of that folder for you.

  4. This will give you a double login to your Zen Cart control panel.

Vger

5 Apr 2009, 3:36 PM
#7
pasb avatar

pasb

New Zenner

Join Date:
Mar 2009
Location:
Essex (UK)
Posts:
71
Plugin Contributions:
0

Re: htaccess files help please

Hi, thanks for your reply,

Is the admin folder the only one that needs the htaccess as the guide seems to to give the idea that its more?

regards
Paul

5 Apr 2009, 3:41 PM
#8
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: htaccess files help please

There are various types of .htaccess protection.

Zen Cart comes pre-equipped with .htaccess files in folders where you want to prevent people from outside of your site directly accessing files in those folders.

What I am referring to is using .htaccess to password protect your 'admin' folder.

Vger

5 Apr 2009, 4:14 PM
#9
pasb avatar

pasb

New Zenner

Join Date:
Mar 2009
Location:
Essex (UK)
Posts:
71
Plugin Contributions:
0

Re: htaccess files help please

Hi,

thanks for reply,

I see various parts have been covered before,i may just be dense today but making the correct choices is important.

Is there a list of the folders that I should place the htaccess in as I don't understand which ones this should be in, I understand that Zen cart comes with htaccess, but I am following the How to secure your Zen cart Store Guide and it does not seem to have a direct list of folders that I need to place htaccess in if Available to do so.

I need some guidance regarding this mainly

thanks
paul

27 Aug 2009, 6:18 PM
#10
beama avatar

beama

New Zenner

Join Date:
Jun 2008
Location:
Ontario, Canada
Posts:
54
Plugin Contributions:
0

Re: htaccess files help please

I agree...when trying to follow the steps for securing your Zen Cart site, the step talking about using .htaccess is VERY confusing to what we are suppose to do.

I understand there are .htaccess files already in place from the install. BUT do we have to add more code to them? or place more of these .htaccess files where there is an index.html file? if so, what folders? if this isn't the case because the install has all of this covered then what is it that we are suppose be taking from this section of instruction.

thanks for the help