Zen Cart Logo
Forums / Installing on a Linux/Unix Server / .htaccess file in root directory- yes or no?

.htaccess file in root directory- yes or no?

Locked

Views: 4,606

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
20 Nov 2008, 9:34 PM
#1
ttoonz avatar

ttoonz

New Zenner

Join Date:
Nov 2008
Location:
NY, USA
Posts:
2
Plugin Contributions:
0

.htaccess file in root directory- yes or no?

I am about to install ZC to the root folder.

When this folder was created by my web host, an "index.html" file was created.

I am assuming that after I install ZC and set it up, I should delete the "index.html" file so that the cart is the home page via the "index.php" file. I got that info from searching this forum, and I do thank those who provided answers to us Zen-challenged individuals...

There is currently no .htaccess file in the root. Once I install ZC to the root, should I have one there? If so- exactly what should be included in the file? I have looked at many of these files in the various places in the ZC folders, but there are many variations, and I am not sure what really needs to be in there, if anything at all...

I tried this once before, using the file manager in the cp on the web host, and all it did was make it so that you could not access the front public end of the site without entering a user/pass- which is definitely not what I wanted...

So- Do I need an .htaccess file in the root? Even if there is no "index.html" file there? What should be in the file if I need it?

Thanks very much. This forum is a great wealth of info, and I plan to read every last thread when I have the time!

20 Nov 2008, 10:27 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: .htaccess file in root directory- yes or no?

In the purest sense, no, you don't need a .htaccess file in your root folder in order for Zen Cart to work.
You can add one later if you need certain specific functionality, but Zen Cart works fine without one in the root. Otherwise it would come with one ;)

20 Nov 2008, 10:50 PM
#3
ttoonz avatar

ttoonz

New Zenner

Join Date:
Nov 2008
Location:
NY, USA
Posts:
2
Plugin Contributions:
0

Re: .htaccess file in root directory- yes or no?

This place is great. Really.

I was "reasonably" sure that I didn't need one there(root), since the documentation says that they are located in folders containing "index.html" files, and I'll actually be deleting that file from the root, once I have everything in a reasonable state.

I was more concerned about it from a security standpoint, because I don't have a full grasp on exactly what the file does. However, having read a copious amount of threads on the subject, it seems that if I were to simply add the one, very general file that's listed in the security documentation, it would actually shut the site down again, since it blocks php, and I need that one "index.php" in the root to be available for the front end...right?

...It's a lot to grasp in a short amount of time, but I think I'm getting it...

...did I mention that this place is great?

21 Nov 2008, 9:07 AM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: .htaccess file in root directory- yes or no?

ttoonz:

it seems that if I were to simply add the one, very general file that's listed in the security documentation, it would actually shut the site down again, since it blocks php, and I need that one "index.php" in the root to be available for the front end...right?
Right.

The documentation is referring to "where index.html" files are supplied with Zen Cart. In the simplest sense, anyway.

25 Nov 2008, 12:42 PM
#5
christophert avatar

christophert

New Zenner

Join Date:
Nov 2008
Posts:
32
Plugin Contributions:
0

Re: .htaccess file in root directory- yes or no?

so should I delete the .htaccess file? It was problematic before and I had to put .htaccess_OFF, but should i delete it altogether?

25 Nov 2008, 12:43 PM
#6
christophert avatar

christophert

New Zenner

Join Date:
Nov 2008
Posts:
32
Plugin Contributions:
0

Re: .htaccess file in root directory- yes or no?

ps ttoonz is right, this forum is very very helpful indeed. :hug:

25 Nov 2008, 12:45 PM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: .htaccess file in root directory- yes or no?

christophert:

so should I delete the .htaccess file? It was problematic before and I had to put .htaccess_OFF, but should i delete it altogether?

That depends entirely on how your hosting company has configured your server. They are the ones who need to answer that question, based on the content of the specific .htaccess file you're referring to vs the rules they've configured on the server for allowed .htaccess content.