Changes between Version 6 and Version 7 of faq/domain/canonical-web-address


Ignore:
Timestamp:
Feb 12, 2015, 11:56:28 PM (10 years ago)
Author:
Daniel Kahn Gillmor
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • faq/domain/canonical-web-address

    v6 v7  
    22= I have multiple domain names that point to my web site - how to I make it so my preferred domain always appears in the browser address bar? =
    33
    4 Many of us have multiple domain names that point to the same web site. For example, you can access our web site by going to mayfirst.org, or www.mayfirst.org, or www.people-link.net, etc.
     4Many of us have multiple domain names that point to the same web site. For example, you can access our web site by going to `mayfirst.org`, or `www.mayfirst.org`, or `www.people-link.net`, etc.
    55
    6 However, we want people to always see mayfirst.org in the address bar of the browser.
     6However, we want people to always see `mayfirst.org` in the address bar of the browser.
    77
    88We do that by adding the following lines to the Web Config settings in the [https://members.mayfirst.org/cp Members Control Panel]:
     
    1010{{{
    1111RewriteEngine On
    12 RewriteCond %{HTTP_HOST} !^mayfirst\.org$ [NC]
     12RewriteCond %{HTTP_HOST} !^example\.org$ [NC]
    1313RewriteCond %{HTTP_HOST} !^$
    14 RewriteRule ^/(.*) http://mayfirst.org/$1 [L,R]
     14RewriteRule ^/(.*) http://example.org/$1 [L,R]
    1515}}}
    1616
    17 You can do the same by replacing `mayfirst.org` with the domain name you want your web site to display in the address bar of the browser. Be sure to place these lines outside of the <Directory> </Directory> section of your web configuration (if it existed), not within it; otherwise, the rewrite rules won't work.
     17You can do the same by replacing `example.org` with the domain name you want your web site to display in the address bar of the browser. Be sure to place these lines outside of the <Directory> </Directory> section of your web configuration (if it existed), not within it; otherwise, the rewrite rules won't work.
    1818
    1919
    20 ==  What if I want to force visitor of my website to use ssl?==
     20==  What if I want to force visitor of my website to use HTTPS?==
    2121
    2222You can add the following lines to the Web Config settings in the [https://members.mayfirst.org/cp Members Control Panel]:
     
    2525RewriteEngine On
    2626RewriteCond %{HTTPS} !=on
    27 RewriteRule ^/(.*) https://my-site.org/$1 [L,R]
     27RewriteRule ^/(.*) https://example.org/$1 [L,R]
    2828}}}