I have sat up two virtual host on the same ip and same document root with Apache, because I want to use shared files and contents in the document root.
I want my second website point to a subfolder of the document root
http://example.com Loads http://example.com/subfolder
I tried various rewrite rules in the .htaccess they all can redirect but maintain the subfolder in the url which I dont like I mean the url would be
http://example.com/subfolder
while I want
http://example.com
these are what I have tried
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
RedirectMatch ^/$ http://example.com/subfolder
OR
RewriteCond %{HTTP_HOST} ^(www.)?example.com$
RewriteRule ^(.*)$ /subfolder/$1 [L]
the second one also gives a 500 Internal Server Error, what should i do?