Atšķirības starp "Forward a domain to a subdirectory/en" versijām

No ''Hostnet Wiki''
Pārlēkt uz: navigācija, meklēt
(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: *Instead of '''domain.com''' type your domain name and instead of '''subdirectory''' type the name of the selected subdirectory.)
 
(1 starpversija, ko mainījis viens dalībnieks, nav parādīta)
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.
  
Šajā datnē Jums jāpievieno šādas rindas:
+
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]
* '''domens.lv''' vietā ierakstiet sava domēna vārdu un '''apaksdirektorija''' vietā ierakstiet izvēlēto apakšdirektorija nosaukumu.
+
*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

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.

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.