Using Slim 3, I want my homepage URL to be www.domain.com
instead of www.domain.com/
.
This routing will redirect all home request to www.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?
Edit:
What is the trick or workaround so that the homepage url looked like it is without trailing slash on the address bar?