title: Grails <g:link> rewriting links to match UrlMappings instead of controller/action
body: <p>Currently using grails 4.0.3.</p>
  <p>I'm trying to generate a link to a controller action using a simple <code>&lt;g:link&gt;</code> tag:</p>
  <pre><code>&lt;g:link controller=&quot;myController&quot; action=&quot;myAction&quot; params=&quot;[someParam:'myValue']&quot;&gt;Link text&lt;/g:link&gt;
  </code></pre>
  <p>In my UrlMappings file, I have this controller mapped to a common URL for external calls.  This mapping forces some parameters that I want forced when coming to this mapping:</p>
  <pre><code>class UrlMappings {
    static mappings = {
      &quot;/service/someExposedUrl&quot; {
        controller = &quot;myController&quot;
        action = &quot;myAction&quot;
        someParam = &quot;defaultValue&quot;
      }
    }
  }
  </code></pre>
  <p>However, the link that gets written to the page in my application gets written using the UrlMapping definition.</p>
  <pre><code>http://serverUrl/service/someExposedUrl?someParam=&lt;ignored&gt;
  </code></pre>
  <p>instead of</p>
  <pre><code>http://serverUrl/myController/myAction?someParam=myValue
  </code></pre>
  <p>In this case, the parameters are ignored on the <code>/service</code> URL because they're hard-coded in the UrlMapping.</p>
  <p><strong>Is there a way to force grails to link to the specified controller/action instead of the mapping?</strong></p>