Atšķirības starp "Forward a domain to a subdirectory/en" versijām
No ''Hostnet Wiki''
(Jauna lapa: The following lines must be added in this file:) |
(Jauna lapa: *Instead of '''domain.com''' type your domain name and instead of '''subdirectory''' type the name of the selected subdirectory.) |
||
| 10. rindiņa: | 10. rindiņa: | ||
RewriteCond %{HTTP_HOST} ^(www.)?domens.lv$ | RewriteCond %{HTTP_HOST} ^(www.)?domens.lv$ | ||
RewriteRule ^(/)?$ apaksdirektorija [L] | RewriteRule ^(/)?$ apaksdirektorija [L] | ||
| − | * ''' | + | *Instead of '''domain.com''' type your domain name and instead of '''subdirectory''' type the name of the selected subdirectory. |
[[Category:CloudHosting]] | [[Category:CloudHosting]] | ||
Pašreizējā versija, 2016. gada 21. novembris, plkst. 13.08
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.