[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cgiapp] RequireSSL POD idea


Here's another idea for the RequireSSL POD. Mention how to use mod_rewrite
for the same task as an alternative:

###

Here's an example of forcing SSL through mod_rewrite. Here is a part
of .htaccess :

 RewriteCond    %{HTTPS} off
 RewriteRule    (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

Of course it forces all requests to be redirected to an https version - but
you could onclude another RewriteCond on-top to let some requests without
requiring SSL ...

 RewriteCond    %{REQUEST_URI}  !Product/details         
 RewriteCond    %{HTTPS} off
 RewriteRule    (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

This would redirect any request except those that look like (start with)
http://www.site.com/Product/details

####

    Mark


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/suppressed/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.