Tuesday, July 28, 2009

Re: SSL protect admin routes

You're missing the initial slash:

RewriteCond %{REQUEST_URI} ^/admin(.*)$

On Tue, Jul 28, 2009 at 12:56 PM, toby1kenobi<toby.mathews@gmail.com> wrote:
>
> Hi there,
>
>  I'm struggling with something I imagine is extremely easy, forcing
> my admin routes to go over SSL. Am I even close?!
>
> RewriteCond %{HTTPS} !=on
> RewriteCond %{HTTP_HOST} ^mylive.domain.com
> RewriteCond %{REQUEST_URI} ^admin(.*)$
> RewriteRule .* https://mylive.domain.com%{REQUEST_URI} [L,R=301]
>
> I have this in the htacess file in webroot, which is what Apache is
> configured to serve the site out of. If I comment out the third line
> all traffic (to any URL) goes over SSL, so I feel like I must be
> nearly there...
>
>  Thanks in advance,
>
> Toby
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: