apache - Mod_Rewrite Force HTTP On All Files Except One -


Sorry if asked before, but I could not find it. I have a folder, when I load it in both HTTPS and HTTP.

I want to leave all the files in that folder one file and load it in HTTP. I have the file to be used in HTTPS: login.php and this folder is called "forum" Also if it helps: all the files in the folder * .php

I was trying something on the lines of this:

  #RewriteCond% {SERVER_PORT}! ^ $ 443 $ #RoyalRoyal ^ / login.fp $ - [L] #Revent Conduct% {SERVER_PORT} ^ 443 $ #Revate Rule ^ (/ login.php) $ https: //% {HTTP_HOST} / $ 1 [QSA , NC, R, L] #RewriteCond% {SERVER_PORT}! ^ 443 $ #RewriteRule ^ (. *) $ Http: //% {HTTP_HOST} / $ 1 [QSA, NC, R, L]  

I'm a little of an amateur when If it comes to mod_rewrite then forgive me if the above is completely closed if you post a solution, then I would appreciate it if you post it with clarification, how can I really learn this I know how it works.

Thanks in advance thanks! David

Try this one:

  option + follow link rewriteinngine On / off port 443 traffic except http: //, except for login.php, rewrite the rewrite% {SERVER_PORT} ^ 443 $ rewrite% {REQUEST_URI}! ^ / Login \ .php $ [nc] rewrite. * Http: //% {HTTP_HOST}% {REQUEST_URI} [R = 301, L] https: // ports for login.php 80 rewrite for traffic% {SERVER_PORT} ^ 80 $ reconfiguration% {REQUEST_URI} ^ / Login \ .php $ [NC] RewriteRule * Https: //% {HTTP_HOST}% {REQUEST_URI} [R = 301, L]  

Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -