Forward a domain to a subdirectory

No ''Hostnet Wiki''
Versija 2016. gada 21. novembris, plkst. 13.07, kādu to atstāja Gatis (Diskusija | devums) (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.)

Pārlēkt uz: navigācija, meklēt
Citas valodas:
English • ‎eesti • ‎lietuvių • ‎latviešu • ‎русский


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.