Atšķirības starp "Forward a domain to a subdirectory/en" versijām
No ''Hostnet Wiki''
(Jauna lapa: == '''How to forward a domain to a subdirectory using .htaccess?''' ==) |
(Jauna lapa: *Instead of '''domain.com''' type your domain name and instead of '''subdirectory''' type the name of the selected subdirectory.) |
||
| (2 starpversijas, ko mainījis viens dalībnieks, nav parādītas) | |||
| 4. rindiņa: | 4. rindiņa: | ||
== '''How to forward a domain to a subdirectory using .htaccess?''' == | == '''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 | RewriteEngine On | ||
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.