LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 10-28-2013, 10:12 AM   #1
unclesamcrazy
Member
 
Registered: May 2013
Posts: 119

Rep: Reputation: 1
Prevent wget to download index.html of 404 page


I use wget to download files, it is working fine but if a wrong path is entered, it goes on 404 page and an index.html is saved.

I do not want that it should create an index.html if wrong path is entered.

Example : here is the mp4 video file link on local server
192.168.1.28/client_demo.mp4

but if some one enters
wget 192.168.1.28/client-demo.mp4
it saves index.html file in his/her home directory.
because there is no file client-demo.mp4, the actual file name is client_demo.mp4

A script is doing this. User enters only path of video and it downloads video file for user.
but if user enters wrong path, it saves index.html in user's home directory.
it is embarrassing for us.

Please help so if user enters wrong path, it will not download index.html insted if it gives message like "path not available", it will be very fine.

Thanks.
 
Old 10-29-2013, 03:00 AM   #2
pan64
Senior Member
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 4,645

Rep: Reputation: 1250Reputation: 1250Reputation: 1250Reputation: 1250Reputation: 1250Reputation: 1250Reputation: 1250Reputation: 1250Reputation: 1250
I think it is decided on the server side, requests to invalid pages will be automatically redirected. wget will not be able to recognize invalid urls.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
wget command doesnt download rpms but only index.html zulkifal Linux - Newbie 11 10-26-2012 08:33 PM
[SOLVED] wget -r doesn't download anything except index.html mahkoe Linux - General 4 06-12-2012 04:40 PM
[SOLVED] wget failed to download a html page moebus Linux - General 11 01-31-2012 09:58 PM
how to modify ERROR 404 (html) and put my own page?? mandriva 2006 ssarrinah Mandriva 2 06-04-2008 07:26 PM
Apache2 no index.html page babelbrennt Debian 1 11-10-2005 07:35 AM


All times are GMT -5. The time now is 07:32 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration