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: Forward a domain to a subdirectory)
 
(Jauna lapa: *Instead of '''domain.com''' type your domain name and instead of '''subdirectory''' type the name of the selected subdirectory.)
 
(3 starpversijas, ko mainījis viens dalībnieks, nav parādītas)
2. rindiņa: 2. rindiņa:
  
  
== '''Kā pāradresēt domēnu uz apakšdirektoriju, izmantojot .htaccess?''' ==
+
== '''How to forward a domain to a subdirectory using .htaccess?''' ==
  
Lai pāradresētu domēnu uz apakšdirektoriju, Jums '''public_html''' direktorijā ir jāizveido datne ar nosaukumu '''.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:
+
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.