Discussion: SSL Redirect
Afficher un message
Vieux 03/10/2006, 20h03   #3
Jim Hayter
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: SSL Redirect

lark wrote:
> lark wrote:
>> Hello All,
>>
>> I do not think that I have a unique situation and/or configuration
>> problem but for some reason I can't find anything on this problem out
>> there.
>>
>> Here's the problem:
>>
>> I have a single apache (1.3) server with an ssl site configured
>> correctly on port 443. We have an intranet environment where it is
>> acceptable to connect to this apache server on port 80 but this server
>> also serves ineternet requests and I want all those requests to
>> automatically roll over to port 443.
>>
>> So for example if the request is coming from an ip address that looks
>> like this "10.5.100.200" it may go to port 80 but any other requesting
>> ip address (other than starting with 10.x.x.x) should roll over to
>> port 443.
>>
>> If you can me out, I thank you in advance.
>>
>> Shawn

>
>
> i put this and it appears is not working:
>
> RewriteEngine On
> RewriteCond %{HTTP_REFERER} !^10\. [NC]
> RewriteRule ^(.*) https://%{SERVER_NAME}$1 [R,L]
>
> Any thoughts????
>
> thanks in advance.


Try using (untested):

RewriteCond %{REMOTE_ADDR} !^10\.
RewriteRule ...

Remember to put this where it will only be invoked if the connection is
not already secure, otherwise you will create a loop.

Jim
  Réponse avec citation
 
Page generated in 0,05612 seconds with 9 queries