Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

Here's the relevant part of our .htaccess file:

RewriteEngine On

RewriteBase /
RewriteRule ^download.shtml     /en/downloads [R]

# Don't rewrite requests for files in MediaWiki subdirectories,
# MediaWiki PHP files, HTTP error documents, favicon.ico, or robots.txt
RewriteCond %{REQUEST_URI} !^/(stylesheets|images|skins)/
RewriteCond %{REQUEST_URI} !^/(redirect|texvc|index).php
RewriteCond %{REQUEST_URI} !^/error/(40(1|3|4)|500).html
RewriteCond %{REQUEST_URI} !^/favicon.ico
RewriteCond %{REQUEST_URI} !^/robots.txt

# Rewrite http://wiki.domain.tld/article properly, this is the main rule
RewriteRule ^(.*)$ /index.php/?title=$1 [L,QSA]

The problem is, we're fighting against the existing MediaWiki rules, and I'm having a hard time telling what's actually going on. The problem seems to be that when we visit download.shtml, it brings us to a wiki page, but says "There is currently no text in this page." when actually when I visit the page using /en/downloads it does display our downloads page.

share|improve this question
up vote 1 down vote accepted

You might want to try adding a condition for your downloads.shtml page so it ignores it in your second rewrite rule. Something like this.

RewriteCond %{REQUEST_URI} !^/downloads.shtml
share|improve this answer
Awesome thanks! – nbolton Jan 13 '10 at 16:39

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.