<p>Yep, you can add the route in <code>config/routes.php</code>.</p>

<pre class="lang-pho prettyprint-override"><code>return [
    'custom/route' =&gt; 'module/controller/action',
];
</code></pre>

<p>(See <a href="https://docs.craftcms.com/v3/routing.html#advanced-routing-with-url-rules" rel="nofollow noreferrer">https://docs.craftcms.com/v3/routing.html#advanced-routing-with-url-rules</a>)</p>

CC BY-SA 4.0
2018-08-13T16:47:03.997Z
That didn't seem to work for me. But it looks like it totally should work. I think it might be something screwy with my local development environment, so I'll keep playing around with it. Thanks for the quick answer! I'll mark it as accepted once I get my env issues figured out!
Tony DeStefano
CC BY-SA 4.0
2018-08-11T16:54:28.770Z
2018-08-11T16:54:28.770Z
Brandon Kelly
<p>I have a module with a route that looks like this:</p>

<pre><code>http://localhost/actions/module/controller/action
</code></pre>

<p>Is it possible to set up a custom route within my module so I can send people to:</p>

<pre><code>http://localhost/module/controller/action
</code></pre>

<p>I'm new to Craft 3, but so far loving it.</p>

<p>Cheers!</p>

<craft3><routing><modules>
Removing "action" from a module's route. Is it possible?
# Removing "action" from a module's route. Is it possible?

(Asked by: username_0 on 2018-08-11)

I have a module with a route that looks like this:
http://localhost/actions/module/controller/action

Is it possible to set up a custom route within my module so I can send people to:
http://localhost/module/controller/action

I'm new to Craft 3, but so far loving it.
Cheers!

**Tags:** craft3, routing, modules

---

## 1 answers

### Answer by username_1 on 2018-08-11. Score: 1

Yep, you can add the route in config/routes.php.
return [
    'custom/route' => 'module/controller/action',
];

(See https://docs.craftcms.com/v3/routing.html#advanced-routing-with-url-rules)

> **Comments:**
> **username_0**: That didn't seem to work for me. But it looks like it totally should work. I think it might be something screwy with my local development environment, so I'll keep playing around with it. Thanks for the quick answer! I'll mark it as accepted once I get my env issues figured out!  

---

