开发者

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

开发者 https://www.devze.com 2023-03-01 08:44 出处:网络
I d开发者_C百科on\'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 nee

I d开发者_C百科on'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!


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

0

精彩评论

暂无评论...
验证码 换一张
取 消