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: Mod rewrite & virtual host combined
Author
flatcircle



Joined: 27 Jun 2006
Posts: 79

PostPosted: Thu 06 Jul '06 20:08    Post subject: Mod rewrite & virtual host combined Reply with quote

Hello,

I'd like to know whether it's possible to use virtual hosts and mod rewrite within apache.

I'm not experienced with apache, so examples are welcome how to use virtual hosts & mod rewrite on Apache.

I want to use

www.domain1.com
www.domain2.com
www.domain3.com

(all on one server)

and for domain1, I want mod rewrite so that
www.domain1.com/login (not the real path but needs to be forwarded to another URL)

Thank you.
Regards.
Back to top
Jorge



Joined: 12 Mar 2006
Posts: 376
Location: Belgium

PostPosted: Fri 07 Jul '06 9:42    Post subject: Re: Mod rewrite & virtual host combined Reply with quote

flatcircle wrote:
Hello,

I'd like to know whether it's possible to use virtual hosts and mod rewrite within apache.

I'm not experienced with apache, so examples are welcome how to use virtual hosts & mod rewrite on Apache.

I want to use

www.domain1.com
www.domain2.com
www.domain3.com

(all on one server)

and for domain1, I want mod rewrite so that
www.domain1.com/login (not the real path but needs to be forwarded to another URL)

Thank you.
Regards.


Sure mod_rewrite works inside a virtual host container...

just create the <virtualhost stuff>... blocks for all the server.

then use the mod_rewrite stuff for redirect to the correct container.


Although

Redirect /login /application/cool/path/thari/hot/login

will work just aswel for a simple forward or redirect
Back to top


Reply to topic   Topic: Mod rewrite & virtual host combined View previous topic :: View next topic
Post new topic   Forum Index -> Apache