Hi, i wanna try to use .htaccess to make some of my pages https, and all others http. Secure Pages module is not an option for me because it is not working good with redirecting from https to http, and there is a problems with it.

So what i have done is, i tried this code in .htaccess:

RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} !^/mypage[NC]
RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} ^/mypage [NC]
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

it is working fine on main page, but if i will go to "mypage". The URL is become like: index.php?q=mypage
without this code Clean URLs working fine.

Do anyone know what is the problem?

Comments

Status: Active » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.