Does anyone have a sample .htaccess for SSL/HTTPS 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 pagesFor the ‘SEO friendly’ requirement I would like to map ALL of the following 6 URIs to map to the same page:
– mydomain.com
– https://www.mydomain.com
– https://mydomain.com
– https://www.mydomain.com
– https://mydomain.com
– https://www.mydomain.com…should ALL map to https://www.mydomain.com/
Also, all subpages of this domain should similarly be mapped:
– mydomain.com/otherpage to https://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/
…and all other permutations of “/contact” in the URI should map to that same “https://www.mydomain.com/contact/” 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?
- The topic ‘Does anyone have a sample .htaccess for SSL/HTTPS for one page?’ is closed to new replies.