90.11 Redirect Domains

20210630 To redirect multiple domains or sub-domains we need to enmod the mod_rewrite module. Then in the root folder of the application create a file .htaccess to turn the rewriting engine on and then include a series of RewriteCond conditions and if the condition is met a RewriteRule will be run. With the [L] flag this will be the last rule to check. In this example, the two mentioned subdomains get mapped directly to specific web pages. The rule pattern is not used (i.e., there is no $1 in the replacement).

RewriteEngine on
RewriteCond %{HTTP_HOST} dashboards.crisper.net.au
RewriteRule ^(.*) https://experience.arcgis.com/experience/02d54f961ba94f1bb4d531a7d321b283 [L]
RewriteCond %{HTTP_HOST} mobile.crisper.net.au
RewriteRule ^(.*) https://experience.arcgis.com/experience/f0ff6fdc820f40e8b557359ec5199f2c [L]

Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0