httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jsl...@gmail.com>
Subject Re: [users@httpd] url rewrite
Date Thu, 19 Aug 2004 19:57:28 GMT
On Thu, 19 Aug 2004 09:01:19 -0700, Manohar N Ellanti
<none.el@comcast.net> wrote:

> But, I think a more elegant solution may be setting the original uri
> request information in a variable that is accessible to scripts like
> PHP. For instance,  SCRIPT_URL or SCRIPT_URI or a new variable something
> like - URL_BEFORE_REWRITE. This would allow application script engines
> (perl, php, jsp/servlets)  to know the subdomain and accordingly alter
> the content being served.

Point your RewriteRules at a script that dumps the entire environment.
 I think you'll find some useful stuff.  (In particular, all the
REDIRECT_ variables.)

This only works, of course, if you do an internal redirect; that is,
don't put http:// on the front or use the R flag.

> 
> Another requirement if some one can show me how to do if possible
> already-
> After rewrite - the client browser should still show in the address bar
> the original path - for instance //subdomain-a.maindomain.com/xxxx
> instead of //www.maindomain/shared/xxxx -

This should work as long as you use an internal redirect (see above).

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message