qwick Noob question on website [Archive] - SpeedGuide.net Broadband Community

View Full Version : qwick Noob question on website


Randy
04-26-05, 11:32 PM
how do i make it so people cant go thru all my directories? like so they have to know the exact url or addy how do I make this so called "index.htmlfile"?

morbidpete
04-27-05, 12:13 AM
im not great with website..but i make an index.htm file in each directory..some are real pages..some just say go away..but that should fix the prob unless they know the filename..i think you can change the cmod(that it?) for the directory so its not public..look into that

Philip
04-27-05, 02:40 AM
either upload an empty index.htm file, or an .htaccess file with a single line in it:
Options -Indexes

or you can remove the read permissions from the directory...

Randy
04-27-05, 09:44 PM
http://comoxvalleyforum.com/ I still dont get It :confused: I made folder and called it index.html but you can still see whats in it I want peep to be able to see whats in it, but i dont want them going thru all the directories.

thx for the help. I hope someday I will understand this stupid thing because i know its so fricken easy but i just cant get it thru my thick skull.. :(

cyberskye
04-28-05, 02:17 AM
http://comoxvalleyforum.com/ I still dont get It :confused: I made folder and called it index.html but you can still see whats in it I want peep to be able to see whats in it, but i dont want them going thru all the directories.

thx for the help. I hope someday I will understand this stupid thing because i know its so fricken easy but i just cant get it thru my thick skull.. :(

I think you meant a file called index.html - I see it in your tree.

What OS is the webserver running on?

It appears you server does not parse *.html files. Try index.htm - you can fix this is you have access to your httpd.conf file (assuming apache here) so that it parses both file extensions. If you have access and need help I can tell you how to do this.

Skye

TonyT
04-28-05, 08:13 AM
You are naming your dirs with an html extension, do NOT do that. Don't use.HTML extensions on dirs. Typical tree would be:

root dir
- cgi-bin dir
-- script files
- public-html or www dir
-- html files
-- img dir
-- -image files

I does not appear that your server is running Apache, which by default parses html files AND will look for a file in ANY dir called index.html, index.htm, index.php and will send it to the browser when requested when the user types the url www.my_site.com/ without typing index.html. If Apache does not find an index file it will send a list of the files in the dir to the browser.

To prevent this list of files from being sent to the browser, open Notepad and save the blank doc as index.html. (it may name it index.html.txt and if does, rename it to just index.html) Put that index.html in each dir on the server EXCEPT the dir that contains your html files that you want users to be able to see in their browsers.

cyberskye
04-28-05, 10:32 AM
I does not appear that your server is running Apache, which by default parses html files AND will look for a file in ANY dir called index.html, index.htm, index.php and will send it to the browser when requested when the


Hi Tony - my apache installs do not automatically parse all those extensions - maybe because I onyl run 1.3.x, I had to manually add the other extensions in httpd.conf. Especially php - it you do not have hte module installed, it shouldn't parse php files.

That said, you are correct that the directories do have a .html extension - apache doesn't parse directories like that - only files that have the extension.

skye

ins_
04-30-05, 05:46 PM
I FOUND YOUR MISTAKE

you uploaded "index.html" as a directory, not as a file.

you might wanna fix that.

TonyT
04-30-05, 06:25 PM
Hi Tony - my apache installs do not automatically parse all those extensions - maybe because I onyl run 1.3.x, I had to manually add the other extensions in httpd.conf. Especially php - it you do not have hte module installed, it shouldn't parse php files.

That said, you are correct that the directories do have a .html extension - apache doesn't parse directories like that - only files that have the extension.

skye
I run Debian woody w/ apache 1.3 and it installs by default to parse those files, and when install (apt) php4, apache will parse php too, don't have to edit the config files.

cyberskye
04-30-05, 09:11 PM
I run Debian woody w/ apache 1.3 and it installs by default to parse those files, and when install (apt) php4, apache will parse php too, don't have to edit the config files.

Must be linux-distro-specific. If I recall correctly, I had to add the .php extension to httpd.conf. One of the [htm|html] combo, too. I ahven't warmed to any package manager yet, so I still roll my own.

Skye