# Homepage Routing without Trailing Slash

**URL:** <https://discourse.slimframework.com/t/homepage-routing-without-trailing-slash/174>\
**Category:** Questions\
**Created:** [April 25, 2016, 3:37am UTC](https://discourse.slimframework.com/t/homepage-routing-without-trailing-slash/174 "2016-04-25T03:37:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![priyabagus](https://avatars.discourse-cdn.com/v4/letter/p/838e76/32.png) [@priyabagus](https://discourse.slimframework.com/u/priyabagus)\
**Post date:** [April 25, 2016, 3:37am UTC](https://discourse.slimframework.com/t/homepage-routing-without-trailing-slash/174/1 "2016-04-25T03:37:57Z")

</div>

Hello all,

I want my homepage URL to be [www.domain.com](http://www.domain.com) instead of [www.domain.com/](http://www.domain.com/).

This routing will redirect all home request to www[dot][domain.com/](http://domain.com/)

```
$app->get('/', function ($request, $response, $args) {

});

```

But this one gives me error.

```
$app->get('', function ($request, $response, $args) {

});

```

I’m using standard .htaccess :

```
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]

```

I think this is a common issue. What is the best workaround for this?

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![akrabat](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.slimframework.com/akrabat/32/9_2.png) [@akrabat](https://discourse.slimframework.com/u/akrabat)\
**Post date:** [April 25, 2016, 7:46am UTC](https://discourse.slimframework.com/t/homepage-routing-without-trailing-slash/174/2 "2016-04-25T07:46:20Z")

</div>

Please see my response on Stack Overflow: [http://stackoverflow.com/a/36833851/23060](http://stackoverflow.com/a/36833851/23060)

---

<div class="post-metadata">

**Author:** ![priyabagus](https://avatars.discourse-cdn.com/v4/letter/p/838e76/32.png) [@priyabagus](https://discourse.slimframework.com/u/priyabagus)\
**Post date:** [April 25, 2016, 7:57am UTC](https://discourse.slimframework.com/t/homepage-routing-without-trailing-slash/174/3 "2016-04-25T07:57:41Z")

</div>

Yes, thank you for the response, Rob.

By the way, what is the trick so that the homepage URL is showed without trailing slash in the address URL?
