 |
 |
stupid newbie question. prepair to point and laugh.
|
 |
|
 |
|
Mac Elite
Join Date: Jun 2004
Location: College
Status:
Offline
|
|
How do I make that "Forbidden You don't have permission to access..." messgae show up when someone goes to a directory, /images for example. I figure it has to do with setting the permissions but I always end up either blocking all the images in the folder from showing up elsewhere or it doesn't work at all. Do I just need to go to one of those pages and copy the source and save it as index.htm? Im using transmit 2 for ftp and I can change the permissions there. Please help a noobie out.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: May 2001
Location: Melbourne, Australia
Status:
Offline
|
|
It depends on what type of hosting you have to start with - Win or Linux server. Do you know which you have? Alternatively, most hosting these days comes with a control panel of some sort, and many allow you to set options like this. In cPanel for instance, there is an 'indexes' section, where you can turn this feature on or off.
|
|
|
| |
|
|
|
 |
|
 |
|
Occasionally Useful
Join Date: Jun 2001
Location: Liverpool, UK
Status:
Offline
|
|
|
|
|
"Have sharp knives. Be creative. Cook to music" ~ maxelson
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2001
Location: the intarweb
Status:
Offline
|
|
if your server provider disnae let you configure .htaccess files for individual directories, you could always get around the problem by just putting a dummy 'index.html*' file in each directory whose content you want to hide, which displays an "access forbidden" message. then if someone navigates to the directory, they'll just see that 'index.html' file instead of a listing of the directory content.
[*or index.htm, or default.htm or default.html - or whatever your server recognises as the index file]
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Jun 2004
Location: College
Status:
Offline
|
|
It's a unix server i believe. I can and have accessed it from the terminal before I had Transmit 2 so I am assuming it must be unix. (does that make any sense? or can a unix terminal access any server, even non unix?) I haven't been told about a control panel, but that might be because I had to take over for a guy who was a terrible web-designer and never really did anything. The last time I tried to contact the server people's tech support I got a generic response e-mail that had nothing to do with my question.
I think I will just make dummy "forbidden" messages by copying the source code from one. Thanks for the info.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Jan 1999
Location: Marietta, GA, USA
Status:
Offline
|
|
Originally posted by MacMan4000:
It's a unix server i believe. I can and have accessed it from the terminal before I had Transmit 2 so I am assuming it must be unix. (does that make any sense? or can a unix terminal access any server, even non unix?) I haven't been told about a control panel, but that might be because I had to take over for a guy who was a terrible web-designer and never really did anything. The last time I tried to contact the server people's tech support I got a generic response e-mail that had nothing to do with my question.
I think I will just make dummy "forbidden" messages by copying the source code from one. Thanks for the info.
Operating systems other than Unix can be accessed from a terminal. How were you accessing it? FTP, SSH, Telnet... If you do have SSH or telnet access, log into the server and use a text editor such as vi or Pico to create a file named .htaccess
In it put a single line, "IndexIgnore *" (minus the quotes of course). If you have FTP access, just create the file on your own computer and upload it to the directory in question.
|
Scott Genevish
scott AT genevish DOT org
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Jun 2004
Location: College
Status:
Offline
|
|
Originally posted by genevish:
Operating systems other than Unix can be accessed from a terminal. How were you accessing it? FTP, SSH, Telnet... If you do have SSH or telnet access, log into the server and use a text editor such as vi or Pico to create a file named .htaccess
In it put a single line, "IndexIgnore *" (minus the quotes of course). If you have FTP access, just create the file on your own computer and upload it to the directory in question.
In the terminal I accessed it by "FTP 111.22.333.444" (but with the real ip address, not those numbers) then typing a username & password. I then used "cd /doc" to get to the folder the site is in. I thought CD was a unix term also, but I could be wrong just like I was wrong in thinking the terminal only could access Unix.
I'v never used SSH or telnet.
Could I just make a "foo.txt" file in textedit that says "IndexIgnore *" and re-name it to ".htaccess" then send it to the directory I want blocked? I have never used pico or vi so I would much rather do it this way if it is possible.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Jan 1999
Location: Marietta, GA, USA
Status:
Offline
|
|
You're using FTP to access the server (File Transfer Protocol), which can only transfer files, so you couldn't do it with Pico or vi anyway. Yes, try what you said: Creating the .htaccess file on your computer and then uploading it with FTP.
And no, cd is a command in the FTP client (it means Change Directory), but the server could still be Unix...
If this doesn't work, you'll need more info on what services this web host provides.
|
Scott Genevish
scott AT genevish DOT org
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Jun 2004
Location: College
Status:
Offline
|
|
ok, I tried that and it did block the directory but it didn't say "forbidden, you do not have access..." it just said "Index of /Images" in heading 1 size.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Jan 1999
Location: Marietta, GA, USA
Status:
Offline
|
|
Try having just this line in the .htaccess file:
Options -Indexes
|
Scott Genevish
scott AT genevish DOT org
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Jun 2004
Location: College
Status:
Offline
|
|
Originally posted by genevish:
Try having just this line in the .htaccess file:
Options -Indexes
That worked! I was just added "Options -Indexes" to the second line right under "IndexIgnore *" and it worked! If it didn't work I was going to try just "Options -Indexes" without "IndexIgnore *" above it. Should I leave both lines there or delete the first one?
Thanks for the genevish 
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Enthusiast
Join Date: Jan 1999
Location: Marietta, GA, USA
Status:
Offline
|
|
Originally posted by MacMan4000:
That worked! I was just added "Options -Indexes" to the second line right under "IndexIgnore *" and it worked! If it didn't work I was going to try just "Options -Indexes" without "IndexIgnore *" above it. Should I leave both lines there or delete the first one?
Thanks for the genevish
You don't need the first line, but it won't hurt anything. It says that when showing a directory listing, don't show anything. The second line says, "don't show directory listings at all".
|
Scott Genevish
scott AT genevish DOT org
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|