Changes between Version 6 and Version 7 of faq/domain/canonical-web-address
- Timestamp:
- Feb 12, 2015, 11:56:28 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
faq/domain/canonical-web-address
v6 v7 2 2 = 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? = 3 3 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.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. 5 5 6 However, we want people to always see mayfirst.orgin the address bar of the browser.6 However, we want people to always see `mayfirst.org` in the address bar of the browser. 7 7 8 8 We do that by adding the following lines to the Web Config settings in the [https://members.mayfirst.org/cp Members Control Panel]: … … 10 10 {{{ 11 11 RewriteEngine On 12 RewriteCond %{HTTP_HOST} !^ mayfirst\.org$ [NC]12 RewriteCond %{HTTP_HOST} !^example\.org$ [NC] 13 13 RewriteCond %{HTTP_HOST} !^$ 14 RewriteRule ^/(.*) http:// mayfirst.org/$1 [L,R]14 RewriteRule ^/(.*) http://example.org/$1 [L,R] 15 15 }}} 16 16 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.17 You 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. 18 18 19 19 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?== 21 21 22 22 You can add the following lines to the Web Config settings in the [https://members.mayfirst.org/cp Members Control Panel]: … … 25 25 RewriteEngine On 26 26 RewriteCond %{HTTPS} !=on 27 RewriteRule ^/(.*) https:// my-site.org/$1 [L,R]27 RewriteRule ^/(.*) https://example.org/$1 [L,R] 28 28 }}}