• 8

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191


File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

I am trying to use .htaccess to make one page on my site redirect to it's https counterpart. The checkout.php page lives in the root / html folder of the site. ( /checkout.php ). I tried using this : (which i found online somewhere). I put it up and got an internal server error.

RewriteEngine On
RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} !checkout.php
RewriteRule ^(.*)$ http://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

The idea is, if a customer is on the checkout.php page then redirect to https... if they aren't, redirect to http. Any help would be awesome.

Here the Rewrite code I use to redirect plain http wordpress admin page access to https. You can customize it to your needs.

     RewriteEngine On
     RewriteCond %{SERVER_PORT} !^443$
     RewriteRule ^wp-admin https://www.example.com/wp-admin [R=301,L]
  • 0
Reply Report
      • 2
    • I am still having a bit of trouble : the line RewriteRule ^wp-admin example.com/wp-admin [R=301,L] for my implementation would I just change ^wp-admin to ^checkout.php and also the change to the url to the right? I did that and it gave me an internal server error.

Trending Tags