views:

41

answers:

1

Hi, I'm trying to redirect anyone surfing to http://forum.student.khleuven.be to http:// forum.kringraad.be. Both URL's redirect to the same directory, basically. I tried the following using .htaccess:

Redirect permanent http://forum.student.khleuven.be/ http://forum.kringraad.be/

and also the following:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^forum\.student\.khleuven\.be$ [NC]
RewriteRule ^(.*)$ http://forum.kringraad.be/$1 [R=301,L]
</IfModule>

Both give me a 500 Internal Server Error. I double checked that mod_rewrite is enabled, and it is. I'm pretty clueless, to be honest :) Anyone know what to do?

+1  A: 

Apparently the solution was this:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^forum.student.khleuven.be$ [NC]
RewriteRule ^(.*)$ http://forum.kringraad.be/$1 [R=301,L]
</IfModule>

I just had to remove the escapes. I don't know why I don't have to escape those dots, but it works perfectly like this.

David M