|
|
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Junior Member Join Date: Aug 2007
Posts: 14
Rep Power: 0 ![]() | 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. |
| | |
| Sponsored Ads | #1.5 |
| Sponsored posting Join Date: The beginning
Posts: lots
| Sponsored by... WM Media - Sell Your Website at above market prices!
|
| |
| | #2 (permalink) |
| Senior Member Join Date: Jun 2007 Location: Greece
Posts: 254
Rep Power: 2 ![]() | 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. |
| | |
| | #3 (permalink) |
| Junior Member Join Date: Aug 2007
Posts: 14
Rep Power: 0 ![]() | 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 ![]() |
| | |
| | #4 (permalink) |
| Administrator Join Date: May 2007 Location: Bucharest
Posts: 649
Rep Power: 10 ![]() | 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. |
| | |
| | #5 (permalink) |
| Member | 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\___)(____)(_)\_) |
| | |
| | #6 (permalink) |
| Junior Member Join Date: Nov 2008
Posts: 24
Rep Power: 0 ![]() | 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. |
| | |