Title: Page being redirected from http to https
Last modified: August 19, 2016

---

# Page being redirected from http to https

 *  [scarecrow](https://wordpress.org/support/users/scarecrow/)
 * (@scarecrow)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/page-being-redirected-from-http-to-https/)
 * Hey everyone!
 * I need a little help.
 * I have a wordpress install that is using a page to obtain credit card info and
   hence needs to be behind https.
    The form is on this page at mysite.com/form/
   and I need the page to be loaded using [https://mysite.com/form/](https://mysite.com/form/)
 * I don’t want to have a “landing” page, and then link to the secure page. The 
   menu that link to this form page is generated automatically through wp_list_pages
   and thus brings in the non-https link. I figured an .htaccess rule to redirect
   the page, but they all end in loops since the page is redirecting to itself.
 * I’ve tried this: (thinking I’m on the right track) but no luck.
 * RewriteRule “^/billpay/water-bill(/.*)” “[https://%](https://%){HTTP_HOST}$1”[
   R=301,L]
 * I’ve also tried: redirect 301 /formpage/ [https://www.newdomain.com/formpage/](https://www.newdomain.com/formpage/)
 * But that results in a loop because the page is in effect redirecting itself.
 * I think the first example above is what I’m looking for, but I can’t seem to 
   get it to work.
 * Please help – I’m supposed to be going live and I can’t until I get this working
   behind ssl.
 * Thanks for any help ya’ll can give me!

Viewing 1 replies (of 1 total)

 *  Thread Starter [scarecrow](https://wordpress.org/support/users/scarecrow/)
 * (@scarecrow)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/page-being-redirected-from-http-to-https/#post-838466)
 * I’ve got it resolved…
 * Anyone else interested, you’ll need to create a conditional rewrite rule like:
 * RewriteCond %{SERVER_PORT} !^443$
    RewriteRule ^billpay/water-bill/(.*) [https://%](https://%){
   HTTP_HOST}/billpay/water-bill/$1 [R=301,L]
 * This will automatically rewrite the url to https as long as the page is not already
   an https link. This conditional keeps it from causing a loop.
 * Very handy to have this capability – thus allowing you to designate any page 
   you want to be loaded with SSL security. Even if you type it without https.
 * Cheers!

Viewing 1 replies (of 1 total)

The topic ‘Page being redirected from http to https’ is closed to new replies.

## Tags

 * [HTTPS](https://wordpress.org/support/topic-tag/https/)
 * [redirect](https://wordpress.org/support/topic-tag/redirect/)
 * [secure pages](https://wordpress.org/support/topic-tag/secure-pages/)
 * [SSL](https://wordpress.org/support/topic-tag/ssl/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [scarecrow](https://wordpress.org/support/users/scarecrow/)
 * Last activity: [17 years, 9 months ago](https://wordpress.org/support/topic/page-being-redirected-from-http-to-https/#post-838466)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
