Atšķirības starp "Forward a domain to a subdirectory/en" versijām
No ''Hostnet Wiki''
(Jauna lapa: In order to forward a domain to a subdirectory, you need to create a file with a name '''.htaccess''' in the '''public_html''' directory.) |
(Jauna lapa: The following lines must be added in this file:) |
||
| 6. rindiņa: | 6. rindiņa: | ||
In order to forward a domain to a subdirectory, you need to create a file with a name '''.htaccess''' in the '''public_html''' directory. | 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$ | ||
Versija, kas saglabāta 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]
- domens.lv vietā ierakstiet sava domēna vārdu un apaksdirektorija vietā ierakstiet izvēlēto apakšdirektorija nosaukumu.