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

I am currently trying to get a webpage of mine running on my local machine. Strangely though, albeit I do use the exact same Directives and RewriteRules, what works on my server, does not work on my local machine.

What happens is that every request to a file is handled as a request to a directory, e.g.

http://mysite/img/logo.png -> http://mysite/img/logo.png/
http://mysite/css/main.css -> http://mysite/css/main.css/
http://mysite/subfolder/page.html -> http://mysite/subfolder/page.html/

My Directives are:

DocumentRoot /var/www/url/to/site
<Directory /var/www/url/to/site/>
  Options none +FollowSymLinks
  AllowOverride All
  allow from all

My Rewrite Rules are:

RewriteEngine on 
RewriteRule ^/?([a-zA-Z0-9-]+)(\/)?$ $1.html
RewriteRule ^/?(natur)?(wohl)?klang/([a-zA-Z0-9-]+)(\/)?$ /$1$2klang/$3.html
share|improve this question
Those rewrite rules don't do redirects. It must be something else. Don't forget to look for .htaccess files or switch AllowOverride to none. – Ladadadada Aug 4 '13 at 14:16

I managed to get it working by changing the Directory Directive from

<Directory /var/www/url/to/site/>


<Directory /var/www/url/to/site>

(note the missing trailing slash).

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.