Redirect root to a subdirectory

As an example, to redirect www.domain.com to www.domain.com/owncloud, follow these steps:

  1. Log into NethServer via SSH

  2. Run the following command to create the index.html file and insert contents:

    vi /var/www/html/index.html

  3. Paste contents:

<!DOCTYPE HTML>
<html><head><meta http-equiv=Refresh content="0;url=/owncloud/"></head></html>

Press escape and then :x to exit saving changes

Change /owncloud/ to whatever sub directory you want to forward root to.

7 Likes