Need some webpage help
Moderator: Thanas
- Shadowhawk
- Jedi Knight
- Posts: 669
- Joined: 2002-07-03 07:19pm
- Location: Western Washington
- Contact:
Need some webpage help
I pretty much use my webspace on Comcast just to store images.
Comcast, in their infinite wisdom of deciding what's best for their users, have set up the server so that if there is no index.html file (or whatever equivilents they have in their list), it displays a 'User has not moved in' page. No plain ol' directory listings are allowed.
This is a pain in my ass, since I've got to log in via FTP to remind myself what files I have there. Making a new index.html file for every time I add files is an even bigger pain.
So, I want a work around. I'd like some piece of code I can drop into a generic index.html file that'll list every file in the directory, just like a normal listing. Comcast's support forums were worthless except for informing me that my scripting options are quite limited (more of that wonderful Comcast service package).
So, anyone have some code, ideas, tips, or a good place I can go to find such code?
Comcast, in their infinite wisdom of deciding what's best for their users, have set up the server so that if there is no index.html file (or whatever equivilents they have in their list), it displays a 'User has not moved in' page. No plain ol' directory listings are allowed.
This is a pain in my ass, since I've got to log in via FTP to remind myself what files I have there. Making a new index.html file for every time I add files is an even bigger pain.
So, I want a work around. I'd like some piece of code I can drop into a generic index.html file that'll list every file in the directory, just like a normal listing. Comcast's support forums were worthless except for informing me that my scripting options are quite limited (more of that wonderful Comcast service package).
So, anyone have some code, ideas, tips, or a good place I can go to find such code?
Shadowhawk
Eric from ASVS
"Sufficiently advanced technology is often indistinguishable from magic." -- Clarke's Third Law
"Then, from sea to shining sea, the God-King sang the praises of teflon, and with his face to the sunshine, he churned lots of butter." -- Body of a pharmacy spam email
Here's my avatar, full-sized (Yoshitoshi ABe's autograph in my Lain: Omnipresence artbook)
Eric from ASVS
"Sufficiently advanced technology is often indistinguishable from magic." -- Clarke's Third Law
"Then, from sea to shining sea, the God-King sang the praises of teflon, and with his face to the sunshine, he churned lots of butter." -- Body of a pharmacy spam email
Here's my avatar, full-sized (Yoshitoshi ABe's autograph in my Lain: Omnipresence artbook)
- Shadowhawk
- Jedi Knight
- Posts: 669
- Joined: 2002-07-03 07:19pm
- Location: Western Washington
- Contact:
Nope. It puts that 'not moved in' page for every subdir you create.Mad wrote:Can you display file listings on subdirectories?
Shadowhawk
Eric from ASVS
"Sufficiently advanced technology is often indistinguishable from magic." -- Clarke's Third Law
"Then, from sea to shining sea, the God-King sang the praises of teflon, and with his face to the sunshine, he churned lots of butter." -- Body of a pharmacy spam email
Here's my avatar, full-sized (Yoshitoshi ABe's autograph in my Lain: Omnipresence artbook)
Eric from ASVS
"Sufficiently advanced technology is often indistinguishable from magic." -- Clarke's Third Law
"Then, from sea to shining sea, the God-King sang the praises of teflon, and with his face to the sunshine, he churned lots of butter." -- Body of a pharmacy spam email
Here's my avatar, full-sized (Yoshitoshi ABe's autograph in my Lain: Omnipresence artbook)
- Vertigo1
- Defender of the Night
- Posts: 4720
- Joined: 2002-08-12 12:47am
- Location: Tennessee, USA
- Contact:
I'd say its time for you to ring them up and give them an earfull. Absolutely no respectable webhost would do something so damned stupid.
"I once asked Rebecca to sing Happy Birthday to me during sex. That was funny, especially since I timed my thrusts to sync up with the words. And yes, it was my birthday." - Darth Wong
Leader of the SD.Net Gargoyle Clan | Spacebattles Firstone | Twitter
Leader of the SD.Net Gargoyle Clan | Spacebattles Firstone | Twitter
- Shadowhawk
- Jedi Knight
- Posts: 669
- Joined: 2002-07-03 07:19pm
- Location: Western Washington
- Contact:
Yes, and that's presumably why they did it. Really annoying that they didn't make it a user-configurable option, though.phongn wrote:Actually, there are security reasons for this, so many webhosts do not let you get directory access.Vertigo1 wrote:I'd say its time for you to ring them up and give them an earfull. Absolutely no respectable webhost would do something so damned stupid.
Shadowhawk
Eric from ASVS
"Sufficiently advanced technology is often indistinguishable from magic." -- Clarke's Third Law
"Then, from sea to shining sea, the God-King sang the praises of teflon, and with his face to the sunshine, he churned lots of butter." -- Body of a pharmacy spam email
Here's my avatar, full-sized (Yoshitoshi ABe's autograph in my Lain: Omnipresence artbook)
Eric from ASVS
"Sufficiently advanced technology is often indistinguishable from magic." -- Clarke's Third Law
"Then, from sea to shining sea, the God-King sang the praises of teflon, and with his face to the sunshine, he churned lots of butter." -- Body of a pharmacy spam email
Here's my avatar, full-sized (Yoshitoshi ABe's autograph in my Lain: Omnipresence artbook)
Try making a file named .htaccess with "Options +Indexes" in it... and upload it. Most likely they disabled those for security reasons though.
ah.....the path to happiness is revision of dreams and not fulfillment... -SWPIGWANG
Sufficient Googling is indistinguishable from knowledge -somebody
Anything worth the cost of a missile, which can be located on the battlefield, will be shot at with missiles. If the US military is involved, then things, which are not worth the cost if a missile will also be shot at with missiles. -Sea Skimmer
George Bush makes freedom sound like a giant robot that breaks down a lot. -Darth Raptor
Or you can get someone to convert this script to windows bash and run it in a copy of your FTP directory on your hard drive before updating:
I love *nix and sed (v4).
Code: Select all
#!/bin/bash
ls|sed -e 's/^\(.*\)/<a href="\1">\1<\/a><br>/g'>/tmp/list
echo '<html>
<head>
<title>List of files</title>
</head>
<body>'>/tmp/head
echo '</body>
</html>'>/tmp/tail
cat /tmp/head /tmp/list /tmp/tail>list.html
rm /tmp/list
rm /tmp/head
rm /tmp/tail
ah.....the path to happiness is revision of dreams and not fulfillment... -SWPIGWANG
Sufficient Googling is indistinguishable from knowledge -somebody
Anything worth the cost of a missile, which can be located on the battlefield, will be shot at with missiles. If the US military is involved, then things, which are not worth the cost if a missile will also be shot at with missiles. -Sea Skimmer
George Bush makes freedom sound like a giant robot that breaks down a lot. -Darth Raptor
- Shadowhawk
- Jedi Knight
- Posts: 669
- Joined: 2002-07-03 07:19pm
- Location: Western Washington
- Contact:
Not really sure what sort of scripting I'm limited to. Pretty sure that CGI is an option. If java/javascript needs any server-side stuff (I'm quite ignorant on it), I'd imagine that's not allowed, either.Mad wrote:So what kind of scripting options do you have? You can't use straight HTML to give you a file listing. (You'd have to update it manually as you suggested... if you only add or removes files every now and then it shouldn't be too difficult to do that.)
Yeah, looks like they have. Won't allow any file that starts with a .Pu-239 wrote:Try making a file named .htaccess with "Options +Indexes" in it... and upload it. Most likely they disabled those for security reasons though.
Shadowhawk
Eric from ASVS
"Sufficiently advanced technology is often indistinguishable from magic." -- Clarke's Third Law
"Then, from sea to shining sea, the God-King sang the praises of teflon, and with his face to the sunshine, he churned lots of butter." -- Body of a pharmacy spam email
Here's my avatar, full-sized (Yoshitoshi ABe's autograph in my Lain: Omnipresence artbook)
Eric from ASVS
"Sufficiently advanced technology is often indistinguishable from magic." -- Clarke's Third Law
"Then, from sea to shining sea, the God-King sang the praises of teflon, and with his face to the sunshine, he churned lots of butter." -- Body of a pharmacy spam email
Here's my avatar, full-sized (Yoshitoshi ABe's autograph in my Lain: Omnipresence artbook)