Web question...
- Started
- Last post
- 15 Responses
- Raniator
You know when you type a web address that points to a path such as:
it is says "you do not have permission to view this virtual directory" or words to that effect...
How can you make it say that?
- Raniator0
I don't mean the "not found" message...
I mean is there a way of making directories that do exist unavailable to view by 'editing' the address and going back a couple of steps.
I mayk senz, plees?
- mistermik0
something about turning off the indexing in cpanel or somewhere else.
- blaw0
There are different ways to set the permissions, the easiest being setting them on the server via your hosting admin. Another route is to use htaccess.
- mikeim0
make a .htaccess file and put the following code:
Options -Indexes
in it and place in root of your web server
- Fariska0
It's about the configuration of the web server.
Just check the hosting plan (usually linux= apache and win=iis)
i don't know about IIS too much, but on apache you need to edit the apache configuration file to do this kind of things
Check on the relative websites for more instructions.
- detritus0
It tends to be the default server setting for folders that don't contain some kind of index page - try deleting your index. html/htm/php/etc or renaming it from 'index'. But yeah, it's a server-side setting involving your .htaccess, as blaw points out.
- Raniator0
ok, thanks guys.
i'll start with my control panel settings, .htaccess etc...
- ********0
most servers are set to prevent directory listing, i think. To make it happen all you need is to delete the index.* page. in the directory.
- mistermik0
Index Manager in cpanel is your answer. no need to fuck around with .htacess files.
- Raniator0
what if i don't have an Index Manager?
- detritus0
You need to dig around the FAQ/Knowledgebase/whatever of your web host and find out from them how you are supposed to amend your server-side details (.htaccess, or whatever). There's no single-way of doing it.
- crillix0
If you can't find a way to turn off the directory browsing you can always throw a blank index.htm, or whatever is the default, in the directory. It won't give a person an error but it won't let them browse the directory either.
- Raniator0
ok, nailed it.
they have a htAdmin script that i've just installed which allows me to fuck around with .htaccess files, set custom error pages etc etc...
so i put 'Options -Indexes' in the .htaccess file and everything is good.
thanks guys, i've never have worked that out for myself :)
- Raniator0
for example:
used to list the contents of the directory. now you just get that horrible error page. job done.