Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292843

http/https with apache .htaccess problem

$
0
0

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?


Viewing all articles
Browse latest Browse all 292843

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>