grails - URLRewriteFilter in Development Environment? -
i using urlrewritefilter forward requests domain "www" version seo. have basic rule:
<rule> <name>domain name check</name> <condition name="host" operator="notequal">www.mydomain.com</condition> <from>/.*</from> <to type="permanent-redirect">http://www.mydomain.com</to> </rule>
this works great production, when running in development mode changes domain well, localhost:8080/mysite
www.mydomain.com
.
how can fix development mode? using grails , tomcat, bundled in .war gets deployed server.
thanks!
can try adding in buildconfig.groovy
exclude dependency? (provided have not added jar in lib
)
grails.project.dependency.resolution = { inherits("global") { if (environment.current != environment.production) excludes "urlrewritefilter" } }
if not work in opinion safest bet fork/clone plugin (which uses latest version of urlrewritefilter:4.0.3
) , modify urlrewritegrailsplugin.groovy
adding below elements:
def environments = ['prod'] //or 'production' def scopes = [excludes:'run'] //if use run-app in development
and use plugin instead of adding dependency.
Comments
Post a Comment