head	1.12;
access;
symbols;
locks
	nobody:1.12; strict;
comment	@# @;


1.12
date	99.09.08.00.37.39;	author nobody;	state Exp;
branches;
next	1.11;

1.11
date	99.09.08.00.34.58;	author nobody;	state Exp;
branches;
next	1.10;

1.10
date	99.08.25.05.26.01;	author nobody;	state Exp;
branches;
next	1.9;

1.9
date	99.06.09.04.55.57;	author nobody;	state Exp;
branches;
next	1.8;

1.8
date	99.04.21.18.37.55;	author nobody;	state Exp;
branches;
next	1.7;

1.7
date	99.04.21.18.37.48;	author nobody;	state Exp;
branches;
next	1.6;

1.6
date	99.04.01.18.59.14;	author nobody;	state Exp;
branches;
next	1.5;

1.5
date	99.04.01.18.02.28;	author nobody;	state Exp;
branches;
next	1.4;

1.4
date	99.03.23.18.28.56;	author nobody;	state Exp;
branches;
next	1.3;

1.3
date	99.03.11.18.52.09;	author nobody;	state Exp;
branches;
next	1.2;

1.2
date	99.03.11.18.51.43;	author nobody;	state Exp;
branches;
next	1.1;

1.1
date	99.03.11.18.51.25;	author nobody;	state Exp;
branches;
next	;


desc
@null
@


1.12
log
@null
@
text
@IDependOn-Set: 1
IDependOn-Set: 2
IDependOn-Set: 41
IDependOn-Set: 46
IDependOn-Set: 47
IDependOn-Set: 7
LastModifiedSecs: 936751058
Parent: 7
SequenceNumber: 11
Title: How do I make hits on 'http://www.myserver.com/' go to a servlet?  or  Aliasing / to a servlet
Part: 0
Author-Set: jon@@working-dogs.com
HideAttributions: 1
LastModifiedSecs: 921178320
Type: monospaced
Lines: 76

----------
From: "Umesh R. Patil" <upatil@@bigfoot.com>
To: "'java-apache-users@@list.working-dogs.com'" <java-apache-users@@list.working-dogs.com>
Subject: / alias
Date: Thu, Mar 11, 1999, 10:48 AM


URL rewriting may be a solution for you:

At the end of httpd.conf add:
-----------------------------

</IfModule>

LoadModule rewrite_module modules/ApacheModuleRewrite.dll

<IfModule mod_rewrite.c>
        RewriteEngine on
        RewriteRule ^/(.*)  /myZone/slash?data=$1 [PT]
</IfModule>

What this does is rewrite urls so that your servlet gets invoked
with anything following the first slash in the URI.

I haven't tested this but it could get you going...

Umesh.

On Thursday, March 11, 1999 9:05 AM, John Frailey [SMTP:john@@ecstreet.com] 
wrote:
> This may sound like a simple request... but I am having all kinds of trouble
> figuring
> out a way to do this:
>
> we host many sites. we build the same servlets that are used among many
> sites.
> depending on the site, we may write to different database tables, or perfom
> different reads from files or db.
>
> my problem is this... I am trying to make a url that looks clean. that is
> just our
> domain, and then the hosted customer name like so:
>     http://ourdomain.com/abc
>     http://ourdomain.com/xyz
>
>     I want to make my servlet aliased to /
>     this would allow me to parse the abc and xyz appropriately. I realize
> that all
> request at that domain will go through that servlet. thats ok. I have set up
> a domain
> just for that reason.
>
> I have set up a zone called slash with a mounting point of / but it seams
> that the
> alias name starts after the slash. I use several different servlet engines,
> (all with
> apache) and can accomplish this with what they call a mapping. (Jrun term)
> Set up
> a map for my servlet name ie ( store.class -> /) to slash.
>
> Is there any idea's on how to get this same functionality with jserv.
> Everything else
> works so good... I they really did a great job of cleaning up the install...
> went
> perfect first time through...
>
> Thanks for any ideas...
>
> p.s. we also offer another option to our cust. that let them get a dns
> entry. this would
> then look like :
>     abc.<ourdomain>.com/store (servlet here is store)
>     but this requires a new dns entry, and a KILHUP on dns. we would like to
> have     a  realtime, non disruptive way like above for an alternative...

EndPart: 0
Part: 1
Author-Set: nnordrum@@isd.net
HideAttributions: 1
LastModifiedSecs: 935558760
Type: monospaced
Lines: 15
If all you want to do is "forward" any requests to 
http://www.xxx.com/
to a servlet you can create an index.html file with the following:
<HTML>
<HEAD>
<META HTTP-EQUIV="Refresh" CONTENT="1; URL=/servlets/Store">
<TITLE>[INSERT TITLE HERE]</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF">
</BODY>
</HTML>

====================================================================
Just replace "/servlets/Store" with the servlet you want to "forward" to.
Clean, simple solution. Works greate. KISS.
EndPart: 1
Part: 2
Author-Set: jon@@working-dogs.com
HideAttributions: 1
LastModifiedSecs: 936750897
Type: monospaced
Lines: 53


----------
From: Bernie Bernstein <bernard@@corp.talkcity.com>
To: "Java Apache Users" <java-apache-users@@list.working-dogs.com>
Subject: Re: Way to make all urls go through one servlet?
Date: Tue, Aug 31, 1999, 9:29 PM

>Say I have a domain http://www.mydomain.com and I want to have all the
>urls that start with /thisdir call a specific servlet as a handler.
>This servlet can then look at the path requested and take the
>appropriate action.
>
>So http://www.mydomain.com/thisdir/status/ would call the servlet as
>would http://www.mydomain.com/thisdir/update/ etc.
>
>I want the one servlet to handle requests for all those paths.
>


... in httpd.conf ...

<IfModule mod_rewrite.c>
RewriteEngine On
# anything else gets appended to /tc/meta
RewriteRule ^(.*) /myzone/myservlet$1 [PT]
</IfModule>



Set up the zone "myzone" which includes servlet "myservlet" and then all
requests will get passed through that servlet.

eg.

http://www.mydomain.com/thisdir/status/

will expand to:

http://www.mydomain.com/myzone/myservlet/thisdir/status/

and

http://www.mydomain.com/

expands to:

http://www.mydomain.com/myzone/myservlet



IMPORTANT: Be sure that mod_jserv is loaded before mod_rewrite.

EndPart: 2
Part: 3
Author-Set: jon@@working-dogs.com
HideAttributions: 1
LastModifiedSecs: 936751058
Type: monospaced
Lines: 22
----------
From: Jonathan Tew <jtew@@bpsinfo.com>
To: Java Apache Users <java-apache-users@@list.working-dogs.com>
Subject: Re: Way to make all urls go through one servlet?
Date: Wed, Sep 1, 1999, 7:21 AM


To whoever else might be trying to accomplish this...

Finally got it working without a core dump.  Your examples below were
correct, but there was some additional changes I had to make.  Since I
statically compiled in the modules I had to make sure that mod_jserv
appearred *ABOVE* (<-- very important) mod_rewrite in modules.c  This
wasn't the default from how Configure created modules.c  Then I had to
make sure that the JServ stuff appearred before the rewrite stuff in the
configuration file.

I'm still of the opinion that mod_rewrite is voodoo magic... I've got to
get a book on regular expression and really learn them.  That one class
back in college just doesn't make ya an expert!

Jonathan Tew
EndPart: 3
@


1.11
log
@null
@
text
@d7 1
a7 1
LastModifiedSecs: 936750897
d9 1
a9 1
SequenceNumber: 10
d176 29
@


1.10
log
@null
@
text
@d7 1
a7 1
LastModifiedSecs: 935558760
d9 1
a9 1
SequenceNumber: 9
d116 60
@


1.9
log
@null
@
text
@d7 1
a7 1
LastModifiedSecs: 928904157
d9 1
a9 1
SequenceNumber: 8
d94 22
@


1.8
log
@null
@
text
@d7 1
a7 1
LastModifiedSecs: 924719875
d9 2
a10 2
SequenceNumber: 7
Title: Aliasing / to a servlet
@


1.7
log
@null
@
text
@d7 1
a7 1
LastModifiedSecs: 924719868
d9 1
a9 1
SequenceNumber: 6
a93 10
Part: 1
Author-Set: anonymous
HideAttributions: 1
Type: directory
Lines: 4
Subcategories:


Answers in this category:
EndPart: 1
@


1.6
log
@null
@
text
@d7 1
a7 1
LastModifiedSecs: 922993154
d9 1
a9 1
SequenceNumber: 5
d97 1
a97 2
LastModifiedSecs: 922989720
Type: 
a103 10
Part: 2
Author-Set: anonymous
HideAttributions: 1
Type: directory
Lines: 4
Subcategories:


Answers in this category:
EndPart: 2
@


1.5
log
@null
@
text
@d7 1
a7 1
LastModifiedSecs: 922989746
d9 1
a9 1
SequenceNumber: 4
a95 1
DateOfPart: 1999-Apr-01 10:02am
d97 2
d105 10
@


1.4
log
@null
@
text
@d7 1
a7 1
LastModifiedSecs: 922213736
d9 1
a9 1
SequenceNumber: 3
d96 1
a97 1
Type: directory
@


1.3
log
@null
@
text
@d5 1
d7 1
a7 1
LastModifiedSecs: 921178329
d9 1
a9 1
SequenceNumber: 2
a12 1
DateOfPart: 1999-Mar-11 10:52am
d14 1
d94 10
@


1.2
log
@null
@
text
@d6 1
a6 1
LastModifiedSecs: 921178303
d8 1
a8 1
SequenceNumber: 1
d10 83
@


1.1
log
@null
@
text
@d3 1
d6 1
a6 1
LastModifiedSecs: 921178285
d8 2
a9 2
SequenceNumber: 0
Title: New Item
@
