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

I am trying to archive an old wordpress blog of mine. So far the best way I have found to do this is via wget. The problem is the name of the files it generates, like "index.html?cat=3&paged=3.html".

When I open this file in my browser off a local drive, it works fine. And when I put it on my local apache server, the page works fine. But when I put it on another webserver, going to "index.html?cat=3&paged=3.html", just sends it to "index.html".

I assume it is doing this because it things ?cat... are some sort of arguments to index.html, but I dont get why this happens on one server and not another.

What I could do to get around this problem is to replace the "?" with "_" in all the filenames and links in the files. However, I am still curious what configuration in the server configuration would be causing this to be handled differently. (he asked secretly hoping this was something simple that could be dropped in an htaccess file)

share|improve this question

The part after the ? is called the query part of the URL and does usually represent variable names and values to be passed by the webserver to an external script or program (CGI, servlet, etc).

I'm guessing but maybe Apache only separates out the query part when the path part is mapped to a directory for which scripting (CGI etc) is enabled (using ScriptAlias, +ExecCGI etc).

share|improve this answer
Thanks for the idea. I tried a bunch of different CGI and PHP config options in the .htaccess file, but I could not find one that affected the URL arguments. – Jono Oct 25 '10 at 17:43
up vote 0 down vote accepted

In the end I just renamed all the files by replacing the "?" with "_". So "index.html?cat=3&paged=3.html" became "index.html_cat=3&paged=3.html".

Then I had to updated all the links in the HTML to reflect the name. Which was easy with regexxer. Not the best solution, but it did the trick. Thanks.

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.