logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

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.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: How to make domaine/sub/file?xxx to sudomainX.domain.net
Author
DreamK



Joined: 14 Jul 2006
Posts: 2

PostPosted: Fri 14 Jul '06 16:19    Post subject: How to make domaine/sub/file?xxx to sudomainX.domain.net Reply with quote

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

Wink
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7294
Location: Germany, Next to Hamburg

PostPosted: Fri 14 Jul '06 17:30    Post subject: Reply with quote

check http://www.apachelounge.com/viewtopic.php?t=524

there are many more solution. They can be found by the forum search...

check also the forum rules
http://www.apachelounge.com/viewtopic.php?t=106
Back to top
DreamK



Joined: 14 Jul 2006
Posts: 2

PostPosted: Fri 14 Jul '06 19:00    Post subject: Reply with quote

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


Wink
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7294
Location: Germany, Next to Hamburg

PostPosted: Fri 14 Jul '06 20:46    Post subject: Reply with quote

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: 7294
Location: Germany, Next to Hamburg

PostPosted: Tue 18 Jul '06 15:13    Post subject: Reply with quote

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


Reply to topic   Topic: How to make domaine/sub/file?xxx to sudomainX.domain.net View previous topic :: View next topic
Post new topic   Forum Index -> Apache