1
* How can I use relative hyperlinks to switch between HTTP and HTTPS?
4
Usually you have to use fully-qualified hyperlinks because you have to
5
change the URL scheme. But with the help of some URL manipulations through
6
mod_rewrite you can achieve the same effect while you still can use relative
10
RewriteRule ^/(.*):SSL$ https://%{SERVER_NAME}/$1 [R,L]
11
RewriteRule ^/(.*):NOSSL$ http://%{SERVER_NAME}/$1 [R,L]
14
This rewrite ruleset lets you use hyperlinks of the form
16
<a href="document.html:SSL">