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: In order to forward a domain to a subdirectory, you need to create a file with a name '''.htaccess''' in the '''public_html''' directory.) |
||
| 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. | |
Šajā datnē Jums jāpievieno šādas rindas: | Šajā datnē Jums jāpievieno šādas rindas: | ||
Versija, kas saglabāta 2016. gada 21. novembris, plkst. 13.07
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.
Šajā datnē Jums jāpievieno šādas rindas:
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.