linux - Problem switching back from forced SSL on certain pages using mod_rewrite -


The client wants to load log pages through https, it is easily complete, but since the site is very URL , We now live in https mode when clicking on login ends. It breaks secure files, which are uploaded to CMS, stored above Webtrot, and if the user has proper permissions it is downloaded via streaming via PHP scripts. Therefore, when we do not live on a login page, then we have to switch back to regular http. What do I have in my .htaccess file:

to overwrite the option; to re-write the follow-up scripts link% {HTTPS} close revoked code% {HTTP_HOST} ^ www \ .domain \ .com [NC] rewrite rule ^ (login \ .php | members \ .php) $ https: //% {HTTP_HOST}% {REQUEST_URI} rewrite% {HTTP_HOST} ^ domain. Com $ [nc] rewritable ^ (login \ .php | member \ .php) $ Https: //www.% {HTTP_HOST}% {REQUEST_URI} RewriteCond% {HTTPS} rewrite% {IS_SUBREQ} false RewriteRule! ^ (Login \ .php | members \ .php) $ http: //% {HTTP_HOST}% {REQUEST_URI}

Everything is working fine except the last line, which is pretty url Is being confused with and redirecting to view.php (which translates too many URL lookup codes to the database ID if I use $ 1 or the path, then I use the {REQUEST_URI}, and the homepage I am doing this.

I need to remove this rewrite as a way to switch back to http mode You have to rewrite your URL, but I do not know how to get the actual address written in it

You can get the original requested URI path from THE_REQUEST :

  RewriteCond% {HTTPS} at RewriteCond% {IS_SUBREQ} false RewriteCond% {THE_REQUEST} ^ [AGED] + \ ([^] +) Retreitrol! ^ (Login | Members) \ php $ http: //% {HTTP_HOST}% 1  

Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -