Redirect all pages to HTTPS minus one in particular

6

I have the following code in .htaccses to redirect the whole site to HTTPS :

RewriteEngine On 
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://meudominio.com/$1 [R,L]

However, I would like to leave a page out of this redirect in order to open in HTTP:

http://meudominio.com/obrigado.php

How can I apply this rule?

    
asked by anonymous 20.12.2014 / 11:51

1 answer

7

You can add a condition to your redirect rule for that particular address.

Before the line RewriteRule , add:

RewriteCond %{REQUEST_URI} !^/obrigado.php$

In this way, the redirect rule is only applied if the address does not stop at obrigado.php .

    
20.12.2014 / 15:10