Forward a domain to a subdirectory
No ''Hostnet Wiki''
How to forward a domain to a subdirectory using .htaccess?
In order to forward a domain to a subdirectory, you need to create a file with a name .htaccess in the public_html directory.
The following lines must be added in this file:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?domens.lv$
RewriteRule ^(/)?$ apaksdirektorija [L]
- Instead of domain.com type your domain name and instead of subdirectory type the name of the selected subdirectory.