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 09:33:29 GMT
... 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.
>>
>>
>>
>> ----- Original Message -----
>> From: "Martin Haase-Thomas" <mht@meome-ag.de>
>> To: <users@httpd.apache.org>
>> Sent: Tuesday, April 16, 2002 4:52 AM
>> Subject: Re: mod_rewrite
>>
>>
>>> did you read http://httpd.apache.org/docs/mod/mod_rewrite.html? i bet
>>> you didn't ;)
>>>
>>> RewriteCond (.*)companyname(1|2|3)(.*)
>>> RewriteRule $1comp$2
>>>
>>> cheers
>>> m
>>>
>>> Brian Bernardo wrote:
>>>
>>>> I need to have an environment where all three urls below go to _
>>>> http://domain.com/__ comp/__ webapp_ <http://domain.com/webapp> , but
>>>> the url must maintain the company name portion (mod_alias not help
>>>> here) .  I have read th at mod-rewrite may be able to help, but I have
>>>> yet to get that going after several days of looking/testing.  Can
>>>> anyone offer assistance?
>>>>
>>>> _ http://domain.com/companyname__ 1__ /__ webapp_
>>>> <http://domain.com/companyname2/webapp>
>>>>
>>>> _ http://domain.com/__ companyname__ 2__ /webapp_
>>>> <http://domain.com/companyname2/webapp>
>>>>
>>>> _ http://domain.com/__ companyname__ 3__ /webapp_
>>>> <http://domain.com/companyname3/webapp>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>> -- 
>>>                   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
>>>
>>>
>>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> 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