httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hans Juergen von Lengerke <lenger...@sixt.de>
Subject Re: mod_rewrite
Date Thu, 18 Apr 2002 06:25:48 GMT
Brian <bbernardo@qwest.net> on Apr 17, 2002:

> Here is what I have for my <IfModule mod_rewrite>
>
> RewriteEngine on
> RewriteRule ^/([^/]+)/(webapp.*)$ /epl/$2 [P,L]
> Rewritelog logs/rewritelog
> RewriteLogLevel 9
>
> I have proxy enabled (default of allow all for now) but I still get
> http://domain/abc/webapp going to http://domain/standard/webapp .  Since the
> url changes from the user side too, it breaks bookmarking by removing the
> company name handler.  I am asking the impossible here?

Brian,

no, you're not asking the impossible. For the rest of this mail I am
assuming that /ebl and /standard are the same thing.

There are two possiblities why the client should see /standard/webapp.
Either you have some other configuration item in your httpd.conf which
applies before the RewriteRule, or the webapp is somehow redirecting the
client to /domain/standard. If it is the latter, have a look at the
ProxyPassReverse directive (see my earlier Mail). If ProxyPassReverse
doesn't help, have a look at the HTML that webapp sends. Maybe it uses
absolute References ala <form action=/standard/webapp>...

Now for the part that webapp needs to know the company name. Your best
bet are two rewrite rules, one for the client request and one for the
proxy request:

  # Proxy /abc/webapp to /standard/abc/webapp
  RewriteRule ^/([^/]+)/(webapp.*)$ /standard/$1/$2 [P,L]

  # Set environment variable for webapp
  RewriteRule ^/standard/([^/]+)/webapp /standard/webapp [E=FOR_COMPANY:$1,PT,L]

Now webapp should have FOR_COMPANY environment variable available.

HTH, Hans


---------------------------------------------------------------------
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
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message