httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew M <and...@jibeya.com>
Subject Re: [users@httpd] RewriteRule - if Not
Date Sat, 04 Dec 2004 20:04:22 GMT
Leif,
I have figured out exactly what I want to do, and discovered the 
solution to what it is I wanted to do ;-)

Andrew
On 4 Dec 2004, at 19:42, Leif W wrote:

>> Andrew M, Saturday, December 04, 2004 13:48
>>
>>> Andrew M wrote:
>>>
>>> I am trying to construct a statement using RewriteRules which says:
>>>
>>> 1. If you are A redirect to https
>>> 2. if you are B redirect to https
>>> 3. if you are not A or B redirect to http
>>>
>>> So I tried:
>>>
>>> RewriteRule (.register)\.(xml)$ https://%{SERVER_NAME}$1.$2 [R,L]
>>> RewriteRule (.confirmStage)\.(xml)$ https://%{SERVER_NAME}$1.$2
> [R,L]
>>> RewriteRule ^/(.register | confirmStage)\.(xml)$
>>> http://%{SERVER_NAME}$1.$2 [R]
>>>
>>> The first 2 lines work fine, but the last one does not. What am I
>>> doing wrong?
>
> This was one thing, and was answered.
>
>> 1. If the url begins with https but the file is not c.xml then flip it
>> so:
>>
>> https://www.mysite.com/c.xml
>>
>> becomes:
>>
>> http://www.mysite.com/c.xml
>
> This example is completely different from the previous.
>
>> Using RewriteRule (.*) http://%{SERVER_NAME}$1 [R] loads the page, but
>> if the url begins with https it remains https.
>
> Yet again this is a third completely different thing.  :p
>
> Before I try to figure out what you want to do, and then tell you how 
> to
> do it (leaving you with only a cut & paste job), how about you figure
> out what you want to do first, then describe it consistently.  Perhaps
> it would help to give more examples of what requests might come in, 
> when
> you want to redirect, and where you want them to go.  For me, figuring
> out when and what to do can be one of the hardest parts so I can
> sympathize.  But it's hard to proceed unless you can describe where you
> want to go.  I'm more familiar with going between https and http when
> each sits in a different VirtualHost section.
>
> Leif
>
>
>
>
> ---------------------------------------------------------------------
> 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