httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Haase-Thomas <...@meome-ag.de>
Subject Re: mod_rewrite
Date Wed, 17 Apr 2002 11:08:34 GMT
a typo, excuse me.

Hans Juergen von Lengerke wrote:

>Martin,
>
>your rewrite doesn't work at all, http://domain/abc/webapp will be
>rewritten to http://domain/standard/abc ! (your $2 should be $3)
>
>Lets assume we'd fix that error. Then what about
>http://domain/foo/bar/abc/whatever ? If I understand the requirements
>correctly, that shouldn't be rewritten but it would be with your
>solution.
>
>Also, what if another company is added. That would mean you have to
>reconfigure the Rewrite.
>
>Also, If the URL shouldn't be visible to clients, a frameset doesn't
>help much by some definitions of 'visible'. So I'd rather go for [P]roxy
>than [R]edirect which will hide the /standard/webapp URL completely from
>the client. This however means, that Brians server must have mod_proxy
>enabled.
>
>Further, we don't yet know, if the webapp needs to know what company it
>is running for. (See my earlier question to Brian)
>
>Let's assume the webapp needs to know. In that case I'd opt for an
>environment variable. And we can get all of this in one line:
>
>  RewriteRule ^/([^/]+)/(webapp.*)$ /standard/$2 [P,E=FOR_COMPANY:$1,L]
>
>If the webapp doesn't need to know the company part of the url you'd do:
>
>  RewriteRule ^/([^/]+)/(webapp.*)$ /standard/$2 [P,L]
>
>Unfortunately, because of Brians url structure, if the webapp sends
>HTTP redirects to clients you need ProxyPassReverse for each company:
>
>  ProxyPassReverse /abc/webapp /standard/webapp
>  ProxyPassReverse /def/webapp /standard/webapp
>  ProxyPassReverse /ghj/webapp /standard/webapp
>
>But as I said, this is only required when webapp sends HTTP redirects.
>
>Hans
>
>
>Martin Haase-Thomas <mht@meome-ag.de> on Apr 17, 2002:
>
>>... additionally:
>>
>>Let's say the frameset is what the users request, and assume it is
>>called main.html. it may well consist of just one frame.
>>
>>on the server side you then should write something like:
>>
>>RewriteCond %{REQUEST_FILENAME} !main.html$
>>RewriteCond (.*) (abc|def|ghi)
>>RewriteRule (.*)/(abc|def|ghi)/(.*) $1/standard/$2 [R,L]
>>
>>if a user now types "http://domain/abc/main.html", he'll get the
>>frameset. if this frameset consists of just one frame, every link the
>>user will follow will be rewritten, whereas in the locationbar he still
>>reads "http://domain/abc/main.html". (admittedly the funny thing with
>>this trick is that if you like to be fair to other websites you will
>>have to figure out a onUnload event handler that removes the frameset)
>>
>>should have been it.
>>
>>regards
>>martin
>>
>>
>>Martin Haase-Thomas wrote:
>>
>>>so the chant will reduce to a one-liner and sound like:
>>>
>>>RewriteRule (.*)/(abc|def|ghi)/(.*) $1/standard/$2
>>>
>>>If you want to hide the resulting URL from the users you should wrap a
>>>frameset around your document.
>>>
>>>
>>>Brian wrote:
>>>
>>>>Of course I read it, but it can obviously be a very hairy mod and I have
>>>>never used it.
>>>>
>>>>it needs to be http://domain/standard/webapp converted from:
>>>>
>>>>http://domain/abc/webapp
>>>>http://domain/def/webapp
>>>>http://domain/ghi/webapp
>>>>
>>>>while the users still see the http://domain/abc/webapp even though
>>>>abc does
>>>>not exist as a valid URL internally.
>>>>
>
>
>---------------------------------------------------------------------
>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
>
>

-- 
                   http://www.meome.de
-------------------------------------------------------
Martin Haase-Thomas         |    Tel.: +49 30 43730-558
meOme AG                    |    Fax.: +49 30 43730-555
Software Development        |           mht@meome-ag.de
-------------------------------------------------------




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