Mobile app version of vmapp.org
Login or Join
Looi9037786

: HTTP for one part of the site, HTTPS for other We have a site which is HTTP, but it has an admin part. How can we secure the admin part with HTTPS? For example, WordPress (which I know)

@Looi9037786

Posted in: #Authentication #Http #Https #Security

We have a site which is HTTP, but it has an admin part. How can we secure the admin part with HTTPS?

For example, WordPress (which I know) is located at foo.com, but we want to have foo.com/wp-admin/
How to do this?

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Looi9037786

2 Comments

Sorted by latest first Latest Oldest Best

 

@Sarah324

A generic non-application way to force an entire directory and its subdirectories to use SSL can be achieved with Apache:

Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) %{HTTP_HOST}%{REQUEST_URI}

Simply put that in a the .htaccess file of the directory you wish to secure. If you put it in your root directory it will force your whole site to be secure.

10% popularity Vote Up Vote Down


 

@Cody1181609

I'll assume you already have an SSL certificate, and have Apache (or $HTTPD) configured properly to work with SSL requests. If this is a bad assumption, let me know.

Otherwise, the quickest way to wrangle WordPress into forcing SSL for logins/admin pages would be the Admin SSL WP Plugin. Install it, activate it, et voilá.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme