Support » Fixing WordPress » 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 pages

    For the ‘SEO friendly’ requirement I would like to map ALL of the following 6 URIs to map to the same page:


    …should ALL map to

    Also, all subpages of this domain should similarly be mapped:

    – to

    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:

    – should map to

    …and all other permutations of “/contact” in the URI should map to that same “” 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)
  • 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!

    Didn’t change anything for me. 🙁

    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.