Thanks for your work on the new routers Jonathan - it makes life much
easier.

Quick question, say I have:

routers = dict(
  BASE  = dict(
      domains = {
          'domain1.com' : 'app1',
          'domain2.com' : 'app2',
      }
  ),
)

But would also like www.domain1.com to map to app1 but also change the URL
to domain1.com (stripping the www part) what is the best way to achieve
that?

Ideally I'd like it to work the same way as this .htaccess:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]

This silently redirects to the non www domain and sends a 301 to any search
engines to make it clear that the only site is at domain1.com (nothing at
www.domain1.com).

Thanks in advance.

Reply via email to