amansker Posted October 27, 2004 Posted October 27, 2004 I have the need to upload files to an ftp account and allow people to download the files with a directory listing. This enables them to view all files on the server and right-click to download. It is not a direct hyperlink to each individual file. In the past I have used: www.domain.com/? to show a directory listing. Currently I'm getting "404 error" with that URL. Is there something I can change on the TCH account? We actually need to access a subdomain if that matters. thanks, Andy Quote
TCH-Bruce Posted October 27, 2004 Posted October 27, 2004 (edited) If you create a subfolder to put the files in on your domain you will get a directory listing if you enter www.****/subfolder Entering the ? is looking for a file named ? witch doesn't exist and that's the reason for the 404 error you are receiving. If you want to access it as a subdomain do not create the folder first. In cPanel create a subdomain which will in turn create the subfolder automatically. You could create one called "files". You can then access a directory listing by typing in http://files.****** This will produce a directory listing providing you don't place an index.htm, index.html or index.php file in that folder. Edited October 27, 2004 by TCH-Bruce Quote
AlanV Posted October 27, 2004 Posted October 27, 2004 If that doesn't work, you may have directory listing disabled. Read http://www.javascriptkit.com/howto/htaccess11.shtml And conversely, if your server is setup to prevent directory listing, but you want to list the directories by default, you could simply throw this into an htaccess file the directory you want displayed: Options +Indexes And Bruce, it would be http://files.****** Quote
TCH-Bruce Posted October 27, 2004 Posted October 27, 2004 And Bruce, it would be http://files.****** Yes, I do know that. I just had a momentarly brain fade while typing it out. Quote
amansker Posted October 27, 2004 Author Posted October 27, 2004 Previously I had created the directory and THEN set up the subdomain. I deleted everything and started over and it works fine. Thanks for the help! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.