httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manohar N Ellanti" <none...@comcast.net>
Subject RE: [users@httpd] url rewrite
Date Thu, 19 Aug 2004 20:12:50 GMT
I think there was a discussion on the PHP boards - regarding
[E=xyz:value] not working in the sense the php script was not able to
pickup the xyz value - it was empty - if you can point me to some script
to dump all the Apache set environment variables   I can give a try.

Regarding the second point - I am not sure why the restriction -
internal file based redirect or external url type redirect, the target
script will be called regardless. So if it is possible to carry
information regarding the original request it will help.

Actually using the http:// prefix is easier as sometime I may not know
the directory path where my target script, particularly in hosted
situations.  I have see some use /usr/var, some use /www/www 

So instead of trying to figure out the directory structure, I can very
safely use  http// redirect - another option may be to use document_root
which might keep the type of redirect as internal.

Since I use http:// prefix in substitution pattern of Rewriterule, it
will be considered external redirect and hence the browser displays the
new URL and not the original one user entered.

-ellanti

 


-----Original Message-----
From: Joshua Slive [mailto:jslive@gmail.com] 
Sent: Thursday, August 19, 2004 12:57 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] url rewrite

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 scripts
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


---------------------------------------------------------------------
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