But it turns out my mod_rewrite is not cooperating the way I want.
This is the setup:
Code: Select all
<VirtualHost *:80>
ServerAdmin admin@domain.tld
ServerName www.domain.tld
ServerAlias domain.tld
DocumentRoot /var/www/domain.tld/
<Directory /var/www/domain.tld>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
allow from all
</Directory>
CustomLog /var/log/apache2/domain_access.log combined
</VirtualHost>
And to test if the rewrite is working Im using this code in /var/www/domain.tld/.htaccess
Code: Select all
RewriteEngine on
RewriteRule testpage\.html http://www.google.com [R]
And as everyone know, checking error-logs will give some answer. But no, nothing here! This is what error.log gives me:
Code: Select all
192.168.0.20 - - [20/Jun/2012:12:49:04 +0200] "GET / HTTP/1.1" 200 519 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:14.0) Gecko/20100101 Firefox/14.0"
Code: Select all
lrwxrwxrwx 1 root root 30 Jun 20 12:18 rewrite.load -> ../mods-available/rewrite.load
Code: Select all
cat rewrite.load
LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
Yeah, Tried a2dismod rewrite / a2enmod rewrite - still nothing.
tl;tr Turing RewriteEngine On = breaks server.