I have a website www.website.com and a few domains that redirect to this site. It's a masked redirect, so if I write www.domain.com I can see this url in the browser all the time, but it's actually redirected to subdomain.website.com What I'd like to do is do some .htaccess rewrite rule, so that everything that has domain domain.com will be rewrited to a local file on a server, that is outside of current folder. Let me explain folder structure here:

/
sub/
-- subdomain/
-- test/
---- index.html
web/

Currently everything from www.domain.com goes to /sub/subdomain. In the .htaccess file in /sub/subdomain I want to reroute the request to /sub/test/index.html. So in my .htaccess file in sub/subdomain folder I've tried this:

Yes, I'm doing all this on top of Wordpress, which I don't really believe matters, but just to be sure I'm posting it.

Unfortunatelly I get Internal Server Error 500

What am I doing wrong, please?

Also: Please don't ask me why I am doing it like this, it has a reason, I'm not uncovering the whole thing I'm trying to do as it is irrelevant to this problem and I really want to focus on this issue here. I just want to know how to fix my .htaccess and it has to be this way. Thank you for your understanding.

this unfortunatelly didn't work. First of all my RewriteCond is correct. But that wouldn't be a problem I changed that, the problem is though the path in RewriteRule and I still get the 500 error
–
Lukas1Oct 17 '13 at 6:46

can you check your Apache error log too what the error is
–
anubhavaOct 17 '13 at 12:51

thanks for your effort, but the error log is not helpfull, it says that limit of recursive redirects is exceeded, but that is clearly only a side effect of paths being set wrong. And that's really what my question is all about. I only don't know how to fix my paths
–
Lukas1Oct 27 '13 at 8:42