You can do this
using a standard ScriptAliasMatch
Here is an
example
AliasMatch /myapp/(.*) /myapp/$1
ScriptAliasMatch /myappd/(.*).html /qsys.lib/myapp.lib/$1.pgm
Using a path that
includes "myapp" is served as a static page from the folder
myapp.
Using a path that
includes "myappd" serves the page dynamically by calling the program name that
precedes ".html".
If you want to hide
the program name, add more ScriptAliasMatch statements e.g.
ScriptAliasMatch /myappd/showcustomer.html /qsys.lib/myapp.lib/SC0001R.pgm
Justin.
-----Original Message-----> I'm not precisely sure what you're asking... You don't want the program
From: [email protected] [mailto:[EMAIL PROTECTED]On Behalf Of John Flitton
Sent: Tuesday, November 22, 2005 1:49 PM
To: [email protected]
Subject: Re: [Easy400Group] Hiding Implementation Details ...
> names to appear in the URL? Is that the gist of it?
Correct.
> If you want something more sophisticated that's able to completely change
> what the URL looks like, you might look at the various mod_rewrite related
> directives in Apache.
I experimented with mod_rewrite, but I discovered when it found
it's matching RewriteRule, it took the resulting replacement string
and prefaced it with the document root, which in my case gave me
http://domain/htdocs/libraryalias/abc.pgm, which it couldn't resolve.
I tried using the R flag for redirection, as well as the RewriteMap
directive to specify an external list, in order to avoid this root
document prefacing problem --- neither worked, as they forced the
server to re-evaluate the entire URL. I spent about 5 hours last
week trying different things with mod_rewrite, and I couldn't get
it to do want I wanted.
> Another idea is to have a state management program that's the target of
> all CGI requests. It could use a cookie to keep track of where the
> browser left off, and could call the appropriate CGI script based on that.
> That way, the user would only see one URL
True, although this relies on cookies, which some users may have
disallowed (probably not many, but some). I guess I'm hoping for a
server-based solution (which is why I tried this various directive
permutations of mod_rewrite).
> There are many possibilities, and I don't know which one to recommend,
> because I don't entirely understand why you have this requirement. Who
> cares if they can see the name of your programs and/or libraries in the
> URL? What harm does that do? What do you want to gain by changing it?
No harm in seeing them I suppose. I was just thinking that it would
be nice to hide them and give the illusion that I'm serving up static
HTML. I guess I was trying to avoid providing the user with
information as to what the host was running to generate the data.
Also, a curious person might think "well, if there is an
OrderEntry.pgm, then there must be an OrderCancel.pgm, an
OrderCopy.pgm, etc". I'd was hoping to force the navigation
through the site by means of the content of the pages, instead of
providing clues as to what program names they could manually enter
into the address bar.
I guess it was a crazy idea after all. :)
John
YAHOO! GROUPS LINKS
- Visit your group "Easy400Group" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
