473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

.htaccess Problem - ( Turn off SSL for every page except login.php and register.php )

ilya Kraft
134 100+
Hello,

Right, so I'm using .htaccess file for my website. I have SSL Certificate enabled, but I only need to use https:// on two pages of my website, I was able to make it so https:// is off for everything except login.php page, but I need to make it so it also works on register.php page.

So how do I change following code, so it sets login.php and register.php to https://

Expand|Select|Wrap|Line Numbers
  1. Options +FollowSymLinks 
  2. RewriteEngine On
  3.  
  4. # Turn SSL off for everything except login.php (register.php)
  5. RewriteCond %{HTTPS} on
  6. RewriteCond %{SCRIPT_FILENAME} !\/login\.php [NC]
  7. RewriteRule ^(.*)$ http://%{HTTP_HOST}/$1 [R=301,L]
  8.  
Aug 25 '11 #1
0 1830

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: Henry Hartley | last post by:
I've got a PHP system working on a development server (Windows 2000/IIS5/PHP 4.3.3) but it doesn't seem to be working quite right on the testing server (same except PHP 4.2.3). I upgraded the PHP...
5
by: neilphan | last post by:
Please Help PHP GURS! I have a login.php form. How do I allow that data on the login.php form accessible to every page in my applicaton? Login.php goes to Auth.php. In Auth.php, i can access...
6
by: ok | last post by:
I tried escape, but it is only good for the special ones like : / ' space etc. I want to turn every charactor into %xx then document.write them. I wonder if i can double % them so I can turn @...
11
by: The Bicycling Guitarist | last post by:
Oh lords and ladies of ciwah, I have already been told by one person that the <h1> on my home page doesn't look like proper semantic markup to them. That person suggested a <p> with style by CSS....
2
by: Antonio | last post by:
Good Morning, I would want to use aspx to write this javascript code for me in every page of my site www.etantonio.it how can I do this ??? <script type="text/javascript"><!--...
2
by: Eric Marthinsen | last post by:
Hello- I need to run some code on every one of my ASP.NET pages (1.x). The code basically registers some client script blocks. I've been trying to find a way to do this that doesn't involve me...
3
by: Katie | last post by:
Hi, I want to be able to send users links to pages in my website. But if they arent logged in I want them to first be redirected to the login page and after they login automatically be...
3
by: Big Charles | last post by:
Hi, How to redirect any page to Login.aspx? I tried writting this in web.config <authentication mode="Forms"> <forms name="aucoockie" loginUrl="wf_login.aspx" protection="All" path="/" />...
2
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 with Apache 2.2. What I want is that if a customer visits any page of the top level directory of my site with this string passed in the URL's query string, "RID=xxx", I...
3
by: paitoon | last post by:
Hi, In my site i set a serach engine page.Which customer could put key word and find the user name in database, I set in one page will show 40 people. If over 40 the page will set to be other...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.