Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
04-18-2013, 07:45 AM #1
Users Finding Files Not Meant for Their Use
I am more or less a beginning developer and don't know the most about permissions, etc. When I have made websites and made them visible to the public I often have several old files still hosted in the online folders. If none of the links on my website point toward these obsolete files then how are my users finding them? I know they are finding them because I get error messages emailed to me when errors occur (obviously would happen a lot when someone is trying to execute an obsolete script).
How do they even know that these files are there? I was under the impression that you would need FTP access to even be able to see what files are or are not in a folder? I know when I try to FTP myself into my websites it asks me for login name and password (which I actually have since I made the darned thing).
Edit: Actually apparently you can look at the folders through the HTTP method. Is there a way to make it so that users cannot see the the existence and names of the specific files in the folders? If I change "Read" permissions to the folder would that do the trick or do I just need to individually change permissions for all files that are obsolete?
For reference my website is http://www.danconia.us and one folder, for instance would be http://www.danconia.us/users
04-18-2013, 08:23 PM #2
- Join Date
- Jun 2003
- Cottage Grove, Minnesota
- Thanked 1,158 Times in 1,149 Posts
If your "new" website doesn't use the 'old' files, then why not just delete them?
First, save them all on your PC (for archive in case you need to see them), and remove them from the website.
If there are still links out on the internet to the 'old' files, create a 404 page that redirects users to your new site main page (404 web page does not exist error). Most webhosts have a way to control error pages.
Yes, use FTP to manage files between your computer and website. FileZilla is a free FTP client. FTP accounts are managed via your website control panel (on the webhost account).
04-18-2013, 11:38 PM #3
- Join Date
- Mar 2013
- Thanked 67 Times in 67 Posts
Yea, you really should delete any files or folders that you aren't using.
If I Google "site:www.danconia.us", I get 150 pages. I'm guessing you aren't using some of them. Lol.
Also, I think most hosts prevent directory browsing, but yours doesn't seem to be the case. You can either add an empty index file in those folders or add this line of code in your .htaccess file:My signature :)
04-19-2013, 12:49 AM #4
- Join Date
- Jun 2002
- Thanked 328 Times in 324 Posts
As ttkim suggested you should turn off the directory listing so people can't find files you aren't using.
The code I think they were going to post is this: