Homepage Routing without Trailing Slash

Hello all,

I want my homepage URL to be www.domain.com instead of www.domain.com/.

This routing will redirect all home request to www[dot]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.

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

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?