Title: Does anyone have a sample .htaccess for SSL/HTTPS for one page?
Last modified: August 19, 2016

---

# Does anyone have a sample .htaccess for SSL/HTTPS for one page?

 *  [frontdesk](https://wordpress.org/support/users/frontdesk/)
 * (@frontdesk)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/does-anyone-have-a-sample-htaccess-for-sslhttps-for-one-page/)
 * I have a new WP site at godaddy with an SSL certificate, and I want to code an.
   htaccess file that…
 * 1) is SEO friendly, and
    2) forces SSL on only one of my site’s pages (a contact
   form), and 3) forces SSL on all WP-ADMIN pages
 * For the ‘SEO friendly’ requirement I would like to map ALL of the following 6
   URIs to map to the same page:
 *  – mydomain.com
    – [http://www.mydomain.com](http://www.mydomain.com) – [http://mydomain.com](http://mydomain.com)–
   [http://www.mydomain.com](http://www.mydomain.com) – [https://mydomain.com](https://mydomain.com)–
   [https://www.mydomain.com](https://www.mydomain.com)
 * …should ALL map to [http://www.mydomain.com/](http://www.mydomain.com/)
 * Also, all subpages of this domain should similarly be mapped:
 *  – mydomain.com/otherpage to [http://www.mydomain.com/otherpage/](http://www.mydomain.com/otherpage/)
 * Note, too, that the trailing “/’ should be appended in all cases except when 
   the URI ends in a file extension (such as “.html” or “.htm”)
 * There would only be one page that I want to force to use HTTPS:
 * – mydomain.com/contact should map to [https://www.mydomain.com/contact/](https://www.mydomain.com/contact/)
 * …and all other permutations of “/contact” in the URI should map to that same “
   [https://www.mydomain.com/contact/&#8221](https://www.mydomain.com/contact/&#8221);
   SSL page.
 * Finally, the other exception would be to force WP-ADMIN pages to all use SSL (
   i.e., force SSL for admin logins and dashboard maintenance)
 * Does anyone have a .htaccess for WP that will do these options?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [pcmehrdad](https://wordpress.org/support/users/pcmehrdad/)
 * (@pcmehrdad)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/does-anyone-have-a-sample-htaccess-for-sslhttps-for-one-page/#post-1344916)
 * Once you checked that your webserver can handle SSL, opne your wp-config.php 
   file (Located at the root of your WordPress install) and paste the following:
 * define(‘FORCE_SSL_ADMIN’, true);
    Save the file, and you’re done!
 *  [RedeemedLife](https://wordpress.org/support/users/redeemedlife/)
 * (@redeemedlife)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/does-anyone-have-a-sample-htaccess-for-sslhttps-for-one-page/#post-1345151)
 * Didn’t change anything for me. 🙁
 *  [RedeemedLife](https://wordpress.org/support/users/redeemedlife/)
 * (@redeemedlife)
 * [16 years, 1 month ago](https://wordpress.org/support/topic/does-anyone-have-a-sample-htaccess-for-sslhttps-for-one-page/#post-1345152)
 * Well actually, my admin pages are all https now, but not any of the pages of 
   the site.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Does anyone have a sample .htaccess for SSL/HTTPS for one page?’ is closed
to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 3 participants
 * Last reply from: [RedeemedLife](https://wordpress.org/support/users/redeemedlife/)
 * Last activity: [16 years, 1 month ago](https://wordpress.org/support/topic/does-anyone-have-a-sample-htaccess-for-sslhttps-for-one-page/#post-1345152)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
