roScripts forum

Wordpress Script Generator
Easily write your own wordpress plugins!
www.wpsecrets.com

Learn Simple PHP
Learn PHP with these simple videos!
www.simplephp.com

PLR Poster
Post hundreds of articles to your wordpress blog(s) at a time!
www.softwarefactoryinc.com/blog-software


Go Back   roScripts forum > Design & development > Site & Server Administration > Hosting

Reply
 
Thread Tools Display Modes
Old 09-10-2007, 05:37 AM   #1 (permalink)
aowaow
Junior Member
 
Join Date: Aug 2007
Posts: 14
Rep Power: 0 aowaow is on a distinguished road
Default Need to hide website folder

hi. how can i hide my website folder in ssl.
Example if you type

https://mydomain.com/ssl/(the_folder_without_backslash)

then it will pop-up my folder in the browser:

Parent directory...
folder1
folder2
file1
file2
file3
etc.etc.

How can I lock this as hidden or page not found.
Or.
Can I redirect it to the folder's index?

If i can, what should I use? how to put, in where and how?
thx before.
aowaow is offline   Reply With Quote
Sponsored Ads   #1.5
Sponsored posting
 
 
Join Date: The beginning
Posts: lots
Sponsored by...

WM Media - Sell Your Website at above market prices!
Adbot is online  
Old 09-10-2007, 10:36 AM   #2 (permalink)
eBoxNet
Senior Member
 
Join Date: Jun 2007
Location: Greece
Posts: 254
Rep Power: 2 eBoxNet is on a distinguished road
Default Re: Need to hide website folder

You can prevent directory listing by creating an .htaccess file on your web folder.

Change your default directory page

This is a command which allows you to specify a file that is to be loaded as your default page whenever a directory or url request comes in, that does not specify a particular page.

[code:df171]DirectoryIndex filename.html[/code:df171]

This would cause filename.html to be the default page of your site, so http://www.yourdomain.com would not go to index.html, but to filename.html.

Redirects

If you change a section of your site structure, why leave people with a 404 when you can just redirect them?
[code:df171]
Redirect /olddirectory/oldfile.html http://yoursite.com/newdirectory/newfile.html[/code:df171]

If the user tries to access the old file, they will be redirected to the new file.


Prevent viewing of .htaccess file


Sometimes, if you have a directory containing files, but not an index file, then the server will display the entire contents of that directory. To prevent this from happening, include this:

[code:df171]IndexIgnore *[/code:df171]

To stop people from viewing the .htacess file in your site, include this line in the file:

[code:df171]<Files .htaccess>
order allow,deny
deny from all
</Files>[/code:df171]

Preventing Directory Listing

Sometimes, if you have a directory containing files, but not an index file, then the server will display the entire contents of that directory. To prevent this from happening, include this:

[code:df171]IndexIgnore *[/code:df171]

The * is known as a wildcard and means all files. You could just block the gif and jpg files for example:

[code:df171]IndexIgnore *.gif *.jpg
[/code:df171]

(Original Source : http://usertools.plus.net/tutorials/id/5 )

You can also use a blank index.php file or an index.php with a redirection

[code:df171]<?php
header('Location: http://www.example.com/');
?>[/code:df171]

If you need more let me know.
Hope this helped.
eBoxNet is offline   Reply With Quote
Old 09-15-2007, 05:31 AM   #3 (permalink)
aowaow
Junior Member
 
Join Date: Aug 2007
Posts: 14
Rep Power: 0 aowaow is on a distinguished road
Default Re: Need to hide website folder

uh oh. looks like i will rent another host. since yahoo wont allow the file with Dot like .htaccess or .**** files.
have tried manipulate uploading without the Dot, and lately change it. But it can't.

I will continue search for more resources if any other way to "manipulate" this
aowaow is offline   Reply With Quote
Old 09-15-2007, 11:35 PM   #4 (permalink)
roScripts
Administrator
 
roScripts's Avatar
 
Join Date: May 2007
Location: Bucharest
Posts: 649
Rep Power: 10 roScripts is on a distinguished road
Default Re: Need to hide website folder

Yep...Yahoo is a good host but way to strict. They don't allow almost anything, I would recommend mediatemple, dreamhost or bluehost.
__________________
Give a man a fish and you feed him for a day. Teach him how to fish and you feed him for a lifetime.
roScripts is offline   Reply With Quote
Old 01-04-2008, 10:51 PM   #5 (permalink)
LarcenIII
Member
 
Join Date: Nov 2007
Location: USA
Posts: 38
Rep Power: 0 LarcenIII is on a distinguished road
Send a message via MSN to LarcenIII Send a message via Yahoo to LarcenIII
Default Re: Need to hide website folder

I recommend using Godaddy or Network Solutions.
Melbourn IT even looked pretty good, but they weren't really on my time schedule!
__________________
x__xxxxxx__xxxx____xxx___xx____xx_xx_
(xx)xxxx/__\xx(xx_x\x/x__)(x___)(x\(x)
x)(__xx/(__)\xx)xxx/(x(__xx)__)xx)xx(x
(____)(__)(__)(_)\_)x\___)(____)(_)\_)
LarcenIII is offline   Reply With Quote
Old 11-21-2008, 01:12 PM   #6 (permalink)
xjessie007
Junior Member
 
Join Date: Nov 2008
Posts: 24
Rep Power: 0 xjessie007 is on a distinguished road
Default Re: Need to hide website folder

Hi,

Yeah, there are many ways how you can accomplish this. In any case, find some other hosting provider, Yahoo is not very flexible if you want to do some special stuff. I go with Forpsi and Station, they are not bad.

In regards to preventing the access

A)
If you have access to your httpd.conf (server configuration) file, add the following to the <Directory> section. The IndexIgnore directive adds to the list of files to hide when listing a directory.

IndexIgnore *

This setting is global. If you want to disable listing for just some folders, then:

B)
If you can edit your .htaccess file (the one in the folder you want prevent from dir listing), insert the following:

Options -Indexes

This stops showing directory listings for URLs which map to the directory.

C)
You could also disable dir indexing completely. Find the following line in your httpd.conf and place a # in front of it.

LoadModule autoindex_module modules/mod_autoindex.so

This will disable directory listing completely for everyone and everywhere.

D)
The Allow,Deny relates to restricting access . Again, this can be either in your httpd.conf or in your .htaccess.

Here is a good page on IndexIgnore: IndexIgnore
See here if interested learning about Order Allow,Deny: Order Allow,Deny

Cheers. Let us know how it goes. What is your website? Just currious.
xjessie007 is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump



All times are GMT. The time now is 11:39 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.