Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I type the following: 

wget is downloading index.html instead of the correct file which is: enca-1.13-2-x86_64.pkg.tar.xz

When I use a windows machine and navigate to the same location, it correctly prompts me to download the tarball package.

share|improve this question

Hmm, uh, works for me! I'm using wget 1.11.4 on a CentOS5 box, fwiw.

If I do a a curl, I get:

$ curl -Iv
* About to connect() to port 80
*   Trying connected
* Connected to ( port 80
> HEAD /packages/extra/x86_64/enca/download/ HTTP/1.1
> User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
> Host:
> Accept: */*
< HTTP/1.1 302 FOUND
HTTP/1.1 302 FOUND
< Date: Sun, 04 Mar 2012 19:20:24 GMT
Date: Sun, 04 Mar 2012 19:20:24 GMT
< Server: Apache
Server: Apache
< Location:

So the redirection is correct, at least on the mirror I'm hitting.

share|improve this answer

Try instead:

wget --trust-server-names


If this is set to on, on a redirect the last component of the redirection URL will be used as the local file name. By default it is used the last component in the original URL."

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.