Changes between Version 8 and Version 9 of faq/domain/canonical-web-address
- Timestamp:
- Sep 28, 2016, 6:33:24 PM (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
faq/domain/canonical-web-address
v8 v9 19 19 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. 20 20 21 The [https://httpd.apache.org/docs/2.4/rewrite/avoid.html Apache docs] suggest the above should now be done using an If statement and Redirect rule as written below. 22 {{{ 23 <If "req('Host') != 'example.org'"> 24 Redirect "/" "http://example.org/" 25 </If> 26 }}} 27 21 28 22 29 == What if I want to force visitor of my website to use HTTPS?== … … 29 36 RewriteRule ^/(.*) https://example.org/$1 [L,R] 30 37 }}} 38 39 The [https://httpd.apache.org/docs/2.4/rewrite/avoid.html Apache docs] suggest the above should now be done using a simpler Redirect rule as written below. 40 {{{ 41 Redirect "/" "https://www.example.org/" 42 }}}