Hi, I have a simple redirect which I just can't get to work and I don't know what's wrong. The server's throwing me a 500 Internal Server Error for no reason I can understand.
I'm trying to achieve the following: if a user types the address www.example.com
, it will actually be routed to domain/
subdirectory in my server. So if user requests www.example.com/index.htm
, it would fetch the file from /var/www/html/domain/index.htm
.
Here's what I have so far:
RewriteEngine On
Options +FollowSymlinks
RewriteCond %{SERVER_NAME} =www.example.com
RewriteRule ^(.*)$ domain/$1 [L]
Mod_rewrite is enabled and functional, as this does work:
RewriteRule ^(.*)$ domain/index.php?$1 [L]
What am I missing here?