Welcome to WebmasterWorld Guest from 18.104.22.168
The site is completely dynamic, and I use mod_rewrite to have clean urls, so I use the following .htaccess file in the root directory:
RewriteRule .* subdir/index.php [L]
So now matter what you type in the browser bar, the file subdir/index.php should be used to generate the content. This worked very well so far.
On the new server, I get only Error 500 (Internal Server Error), no matter what I type in.
I am not sure, if this is because I now (until the domain is transferred) use the IP address.
When I use the following file, no matter what I type in, the page is redirected, but unfortunately, the Url changes to [IP.ADD.RE.SS...] so the page can not be generated.
RewriteRule .* [IP.ADD.RE.SS...] [L]
Thank you for your help,
I think you've got several questions here...
First, when you get a 500 error, what does your raw server error log say?
Secondly, using an IP address is OK -- it should cause no unexpected problems unless you specifically add your own code to prevent access-by-IP.
Lastly, if you use an external redirect ( [IP.ADD.RE.SS...] ), then the address bar *will* change - that is part of the 'definition' of an external redirect. To avoid that, use:
RewriteRule .* /subdir/index.php [L]