apache sub domain redirect naar sub folder

Pagina: 1
Acties:

Onderwerpen


Acties:
  • 0 Henk 'm!

  • Gijs007
  • Registratie: Februari 2008
  • Laatst online: 14-09 21:06
Ik host een website voor een vriend van mij op de domein naam xhalo.tk en wil nu ook een sub domein naam van mijn site gebruiken om naar zijn site te linken: sapp.xgclan.com

Ik maak gebruik van apache en gebruik voor zijn site een vhost:

<VirtualHost xhalo.tk:80>
ServerName xhalo.tk
DocumentRoot "C:\Program Files (x86)\Apache Software Foundation\Apache2\htdocs\sapp"
</VirtualHost>

Dit ging altijd goed, nu wil ik ook de subdomein naam hier aan toevoegen maar telkens als ik dit doe wordt mijn gewone site (xgclan.com en www.xgclan.com geredirect naar de sub folder sapp.)

AMD Ryzen 7 9800X3D | Corsair H150i Elite LCD | GIGABYTE X670E AORUS XTREME | G.Skill Trident Z F5-7800J3646H16GX2-TZ5RK | Inno3D GeForce RTX 4090 iCHILL X3 | Corsair HX1000i | Crucial T700 4TB | Intel Optane 905P 1.5TB | MP600 NH 8TB | Corsair iCUE 5000T


Acties:
  • 0 Henk 'm!

  • Gijs007
  • Registratie: Februari 2008
  • Laatst online: 14-09 21:06
Het lukt nog steeds niet... ik heb al van alles met htacces geprobeerd:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^sapp.xgclan.com [NC]
RewriteRule ^/(.*)$ /sapp/$1 [L]

RewriteEngine On
RewriteCond %{HTTP_HOST} ^(sapp.)xgclan.com$
RewriteRule ^(/)?$ sapp [L]

maar allemaal zonder succes...

en als ik

<VirtualHost *:80>
ServerName xgclan.com
DocumentRoot "C:\Program Files (x86)\Apache Software Foundation\Apache2\htdocs"
</VirtualHost>

<VirtualHost *:80>
ServerName sapp.xgclan.com
DocumentRoot "C:\Program Files (x86)\Apache Software Foundation\Apache2\htdocs\sapp"
</VirtualHost>

dan kom ik alleen op mijn eigen site, ook als ik sapp.xgclan invul en als ik de 2 omwissel dan kom ik alleen op zijn site...

zelfde verhaal met

<VirtualHost xgclan.com:80>
ServerName xgclan.com
DocumentRoot "C:\Program Files (x86)\Apache Software Foundation\Apache2\htdocs"
</VirtualHost>

<VirtualHost sapp.xgclan.com:80>
ServerName sapp.xgclan.com
DocumentRoot "C:\Program Files (x86)\Apache Software Foundation\Apache2\htdocs\sapp"
</VirtualHost>

[ Voor 60% gewijzigd door Gijs007 op 12-02-2012 13:13 ]

AMD Ryzen 7 9800X3D | Corsair H150i Elite LCD | GIGABYTE X670E AORUS XTREME | G.Skill Trident Z F5-7800J3646H16GX2-TZ5RK | Inno3D GeForce RTX 4090 iCHILL X3 | Corsair HX1000i | Crucial T700 4TB | Intel Optane 905P 1.5TB | MP600 NH 8TB | Corsair iCUE 5000T


Acties:
  • 0 Henk 'm!

Verwijderd

Heb je geen NameVirtualHost directive?

Niet volgens het boekje maar probeer eens:

code:
1
2
3
4
5
6
7
8
9
10
11
NameVirtualHost xgclan.com:80

<VirtualHost xgclan.com:80>
ServerName xgclan.com
DocumentRoot "C:\Program Files (x86)\Apache Software Foundation\Apache2\htdocs"
</VirtualHost>

<VirtualHost sapp.xgclan.com:80>
ServerName sapp.xgclan.com
DocumentRoot "C:\Program Files (x86)\Apache Software Foundation\Apache2\htdocs\sapp"
</VirtualHost>


Officieel moet je NameVirtualHost directive een [IP-adres]:[poort] constructie zijn en niet een [hostname]:[poort]..