Just starting to try to get the hang of how all the directives and options work under Apache.
I'd like to do a redirect with my one site (only running one site on the server) so that when a request comes in to http:/example.com the server automatically redirects them to a sub-url of http://example.com/mylink.
I have tried putting redirects into the file located in /etc/apache2/sites-enabled to rewrite this, but then the top level domain URL complains it isn't redirecting properly.
I think what I want is a browser redirect, and thought using
RewriteEngine On RewriteRule ^/$ /mylink [L,R]
would work, but putting it into an .htaccess file didn't work (it redirected but immediately gave a 500 internal server error.)
Putting it into the file in /etc/apache2/sites-enabled gives a configuration error when trying to restart Apache.
I know it's something simple...but what am I missing?