forked from Seravo/wp-https-domain-alias
-
Notifications
You must be signed in to change notification settings - Fork 1
/
readme.html
51 lines (36 loc) · 2.05 KB
/
readme.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<h3>Installation</h3>
<ol>
<li>Upload `https-domain-alias.php` to the `/wp-content/plugins/` directory.</li>
<li>Activate the plugin through the "Plugins" menu in WordPress.</li>
<li>Make sure the `wp-config.php` defines the needed constants.</li>
</ol>
<p>Example:<br>
<br>
<code>define('FORCE_SSL_ADMIN', true);</code><br>
<code>define('HTTPS_DOMAIN_ALIAS', 'example.org');</code>
</p>
<p>The plugin scenario assumes the site domain is example.com but there is no https certificate for it. Instead there is a https certificate for example.org, which has been defined as the <code>HTTPS_DOMAIN_ALIAS</code>.</p>
<p>In a WordPress Network installation the <code>HTTPS_DOMAIN_ALIAS</code> can be defined as *.example.org and then <domain.tld> will be redirected to <domain>.example.org. This plugin is designed to be compatible with
the <a href="http://wordpress.org/plugins/wordpress-mu-domain-mapping/" target="_blank">WordPress MU Domain Mapping plugin</a>.</p>
<p>Possible values of <code>$location</code> when calling this function
<ul>
<li>http://example.com</li>
<li>https://example.com ← the case where https fails and we want to avoid</li>
<li>http://example.example.org</li>
<li>https://example.example.org ← the case where https works</li>
</ul>
</p>
<h3>Frequently Asked Questions<h3>
<h4>Does this work for WordPress Network?</h4>
<p>Yes, since version 0.4.</p>
<h4>Where is the UI?</h4>
<p>This plugin has no visible UI, the magic happens automatically is the plugin is active.</p>
<h4>What does FORCE_SSL_ADMIN do?</h4>
<p>See <a href="http://codex.wordpress.org/Administration_Over_SSL" target="_blank">http://codex.wordpress.org/Administration_Over_SSL</a></p>
Note that defining <code>FORCE_SSL_LOGIN</code> is not needed.
<h3>Screenshots</h3>
<p>Example when on <strong>coss.fi</strong> <code>HTTPS_DOMAIN_ALIAS</code> is <strong>coss.seravo.fi</strong>:<br><br>
<code>$ curl -I http://coss.fi/wp-admin/</code><br>
<code>HTTP/1.1 302 Found</code><br>
<code>Location: https://coss.seravo.fi/wp-admin/</code>
</p>