I only want to redirect my checkout page to https

User Generated

gnlznt

Programming

Description

I only want to redirect my checkout page to https. Will the following work?

redirect 301 http://www.patioslingsite.com/products-page/checkout https://www.patioslingsite.com/products-page/checkout


User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

Try using .access to redirect.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^http://www.patioslingsite.com/products-page/checkout$ [NC]
RewriteRule ^(.*)$ https://www.patioslingsite.com/products-page/checkout$1 [R=301,L]

RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Are you using apache? Create a file called .htaccess in your webroot and copy paste the code above.

Related Tags