473,320 Members | 2,088 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

stop listing of directory using url

21
How can I stop the web visitors ,if they are trying to display the folder content ,using URL
Feb 3 '10 #1

✓ answered by hitendrap

For Linux if the .htaccess doesnt work'

then just put that code in httpd.conf file normally found @ /wwwroot/conf the Apache Installation directory

Or edit the directory tags folln' code worked for me applies to all directories
Expand|Select|Wrap|Line Numbers
  1. <Directory />
  2.     Options FollowSymLinks
  3.     AllowOverride None
  4.     Order deny,allow
  5.     Deny from all
  6. </Directory>

Better read apache manual for more info

10 2723
Dormilich
8,658 Expert Mod 8TB
simply put an index.html in every directory. (although you could also deactivate directory listing (in Apache you’d do that with .htaccess))
Feb 3 '10 #2
jyaseen
21
@Dormilich
Thank you for your reply,
Here I know how to add index.html file.
but I don't know how to use .htaccess file . if you don't mind can you explain how to use it.
Feb 4 '10 #3
Dormilich
8,658 Expert Mod 8TB
quick look at the Apache documentation
Expand|Select|Wrap|Line Numbers
  1. <Directory /path/to/directory>
  2.    Options -Indexes
  3. </Directory> 
Feb 4 '10 #4
jyaseen
21
I add index.php file in my all directory including images, but now it is not displaying images in website.
even after i delete all index.php file , still it is not working
Feb 4 '10 #5
jyaseen
21
@jyaseen
sorry, my dear it was my mistake, now it is working.
Feb 4 '10 #6
jyaseen
21
@Dormilich
I am totally new to .htaccess , I did not understand what you wrote above , where I have to put this code.
Feb 4 '10 #7
Dormilich
8,658 Expert Mod 8TB
  • create a text file
  • put the code above in
  • save as ".htaccess" in the topmost Apache web directory concerned
what the code does, is disabling the directory display
Feb 4 '10 #8
Markus
6,050 Expert 4TB
This can also be done in your Apache .conf files.
Feb 4 '10 #9
For Linux if the .htaccess doesnt work'

then just put that code in httpd.conf file normally found @ /wwwroot/conf the Apache Installation directory

Or edit the directory tags folln' code worked for me applies to all directories
Expand|Select|Wrap|Line Numbers
  1. <Directory />
  2.     Options FollowSymLinks
  3.     AllowOverride None
  4.     Order deny,allow
  5.     Deny from all
  6. </Directory>

Better read apache manual for more info
Feb 5 '10 #10
Dormilich
8,658 Expert Mod 8TB
This can also be done in your Apache .conf files.
if you can modify that. not allowed on every web host. (esp. if you’re not the owner)
Feb 5 '10 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Chris | last post by:
Hello Am really worried, so wondered if anyone could help. My site outgrew itself recently so we've had to make changes to the url structure. I have some important url's like this:...
15
by: Kim Jensen | last post by:
I'd like to make a directory listing where instead of the entire filename I need it to show the filename minus the extention and get the value of charname= in the file itself. I've been told...
19
by: SU News Server | last post by:
I've struggled with this for quite a while and I'm am just not sure what is going on. I have the following code import os def buildList( directory='/Users/mkonrad' ) dirs = listing =...
2
by: Tom | last post by:
I need to get a directory listing through http. If I put the directory path in the browser address bar such as http://somewebpage.com/subdir I get the listing of the directory. Of course this is...
8
by: gil | last post by:
Is it possible to prevent a browser from listing the entire contents of a folder? The site, is hosted on my ISP with the following layout- site/ "user name from ISP" pagefile (dir)...
1
by: Light | last post by:
Re, I'm having 2 problems with the Telerik trial controls. I'm using the latest release. I'm using 2005 studio and most of the controls show up properly in the designer but the RadMenu does...
3
by: cj | last post by:
This program is used to send files to an ftp server at 2:00am each day. At the very top of my program I dim a new instance of a com FTP control. I have a processing sub which calls a login function...
7
by: epikto | last post by:
I have a mapped share that I am trying to get a listing of all the files that it contains. I use the following code to access the contents String files = Directory.GetFiles(path); I can then...
4
by: techusky | last post by:
I have a *very* simple script written that displays the directory listing of the current working directory, but I am having some difficulty when I try to change folders. Basically, I have my $dir...
5
by: jain236 | last post by:
HI every body, i am always getting the following error while parsing a directory . i am reading a directory by doing ls and trying to find out the name,type,size, mtime and mode of files from...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.