Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: How to make domaine/sub/file?xxx to sudomainX.domain.net |
|
Author |
|
DreamK
Joined: 14 Jul 2006 Posts: 2
|
Posted: Fri 14 Jul '06 16:19 Post subject: How to make domaine/sub/file?xxx to sudomainX.domain.net |
|
|
Hi,
I would like to know hox to make forr making an alias like this :
domaine/sub/file?xxx to sudomainX.domain.net
Should I use a soft or something else ?
(Windows 2003, Apache2, php5, mySQL4 : home server, 2xWan)
Thanks in advance
Yoan, Paris, France
|
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
|
Back to top |
|
DreamK
Joined: 14 Jul 2006 Posts: 2
|
Posted: Fri 14 Jul '06 19:00 Post subject: |
|
|
Hi,
Thanks for your answer,
Unfortunately, i have ever configurated my virtual hosts, it s no the question about
Code: | NameVirtualHost *
<VirtualHost *>
ServerName www.domain1.com
ServerAlias domain1.com *.domain1.com
DocumentRoot x:/www/domain1/
</VirtualHost>
<VirtualHost *>
ServerName www.domain2.com
ServerAlias domain2.com *domain2.com
DocumentRoot x:/www/domain2/
</VirtualHost> |
The main question is :
how to do for redirect a dynamique url to a subdomain, like -
Quote: | http://www.domain.com/subdomain1/lyyyy-optical-mouse-black-mouse-retail-p-1258.html?xxx to http://virtualhost |
|
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Fri 14 Jul '06 20:46 Post subject: |
|
|
if you can run PHP use header();
http://www.php.net/header
In the topic I have choosen as answer there is the answer!
With mod rewrite
Redirect /login /application/cool/path/thari/hot/login
there can also be a vhsot |
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7371 Location: Germany, Next to Hamburg
|
Posted: Tue 18 Jul '06 15:13 Post subject: |
|
|
Found a solution in a german user group
Code: |
Alle Anfragen auf /ordner1 sollen auf der gleichen Domain auf /ordner2
umgemappt werden.
# Schreibt extern um
RewriteCond %{REQUEST_URI} ^/ordner1/
RewriteRule ^/ordner1/(.*)$ http://%{HTTP_HOST}/ordner2/$1 [R,L]
# aendert das Ziel, Im Browser bleibt aber die alte URI erhalten
# interne Umschreibung
RewriteCond %{REQUEST_URI} ^/ordner3/
RewriteRule ^/ordner3/(.*)$ /ordner4/$1 [PT]
|
|
|
Back to top |
|
|
|
|
|
|