I have an SSL certificate installed on my website and I would like to redirect two specific pages to https, e.g. http://domain.com/?page=credit and http://domain.com/?page=submit_form
to https.
My web host added the following code to my .htaccess file, above the WordPress settings but it still doesn’t redirect the pages:
Redirect /?page=credit https://domain.com/?page=credit
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteCond %{QUERY_STRING} (^|&)p=(credit)($|&)
RewriteRule (.*) https://domain.com/?page=credit [R=301,QSA,L]
I’m sorry I’m not too good at this. Any help I can get will be appreciated.
Thanks.
Enable mod_rewrite and .htaccess through
httpd.conf
and then put this code in your.htaccess
underDOCUMENT_ROOT
directory: