I only want to redirect my checkout page to https

timer Asked: Jun 6th, 2013
account_balance_wallet $5

Question 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

Tutor Answer

School: UT Austin

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.

flag Report DMCA

awesome work thanks

Brown University

1271 Tutors

California Institute of Technology

2131 Tutors

Carnegie Mellon University

982 Tutors

Columbia University

1256 Tutors

Dartmouth University

2113 Tutors

Emory University

2279 Tutors

Harvard University

599 Tutors

Massachusetts Institute of Technology

2319 Tutors

New York University

1645 Tutors

Notre Dam University

1911 Tutors

Oklahoma University

2122 Tutors

Pennsylvania State University

932 Tutors

Princeton University

1211 Tutors

Stanford University

983 Tutors

University of California

1282 Tutors

Oxford University

123 Tutors

Yale University

2325 Tutors