Redirecting particular pages to secure sockets

Discuss practical ways rearrange URLs using mod_rewrite.

Redirecting particular pages to secure sockets

Postby servantofgod » Thu Nov 20, 2008 1:48 pm

How is it possible for me to redirect pages such as http://www whatsshopping.com/viewcart.php, http://www whatsshopping.com/shippingdetails.php to their secure https versions, as well as making sure that all the content is secured. I have a problem with messages saying "This page contains secure and unsecure items"
servantofgod
 
Posts: 22
Joined: Wed Oct 01, 2008 8:14 am
Location: Chicago

Postby richardk » Fri Nov 21, 2008 12:51 pm

Try
Code: Select all
Options +FollowSymLinks

RewriteEngine On

RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(shippingdetails\.php|viewcart\.php)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]


I have a problem with messages saying "This page contains secure and unsecure items

Make sure you don't have any http:// URLs to images, etc. in your page.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Friendly URLs with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 4 guests

cron