Skip to navigation

Question:
Redirect all sub-domains except www to the www sub-domain

Use simple algorithms as well as simple data structures.