Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

Basically, I have a few subfolders that I would like to access and I can't seem to access them unless their is a index.php/html is located in that file. How do I enable it so that I can access any file within the folder without their being a index page?

I am hosting at GoDaddy, if that makes any difference (and it is a Linux server).

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Presumably you are expecting to see a directory listing of the files in that folder? This is a feature of the webserver and is often disabled by default for security reasons - since sites don't generally want users to be able to simply browse the files on their server.

On Apache this is controlled by mod_autoindex and you should be able to enable directory indexes with the following directive in .htaccess:

Options +Indexes

Various other directives can be specified in order to customise the formatting.


However, I may have misunderstood(?), as your question seems to contradict what I would have expected to be normal behaviour...

I can't seem to access them unless their is a index.php/html is located in that file.

If there is an index.php/html file in a folder you are trying to view then you won't see a directory index, you will see the index.php file instead (which seems to be the opposite to what you state above).

How do I enable it so that I can access any file within the folder without their being a index page?

To access any file within the folder you simply need to specify the full URL of that file, this is irrespective of whether you have an index.php document or not and is certainly necessary when you do (rather than when you do not, which again seems to be the opposite to what you have stated).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.