Johnathon Sanders
Johnathon Sanders

Reputation: 609

What is the best way to redirect a www subdomain within a grails webapp

I don't have access to any of the underlying architecture, so within my Grails webapp I have to be able to perform the redirect. When requests come in for http://www.scriptynote.com I need to return a 301 redirecting to http://scriptynote.com . I'm assuming there is some way to do this within the UrlMappings file? Thanks for any help out there!

Upvotes: 0

Views: 261

Answers (1)

Bozho
Bozho

Reputation: 597124

You can create a filter, e.g. DomainFilter where you can check if there's www as subdomain, and if so, redirect to http://mysite.com

Upvotes: 1

Related Questions