Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

popica's avatar

Laravel and webmail url conflict

Hi, I am hosting a domain (larabits.com) and when I access the url for email client https://www.larabits.com/webmail I get errors from Laravel instead of accessing the Roundcube email client. How can I tell laravel to not consider /webmail ?

0 likes
2 replies
Nash's avatar

I don't know what your exact setup is, but it might be easier to just use a subdomain, e.g. webmail.larabits.com, for your Roundcube installation rather than using the same as your Laravel application (ww.larabits.com/larabits.com).

2 likes
grenadecx's avatar

I assume it's not actually laravel that causes this, but the webserver itself. But if you use apache, you could update the .htaccess file in the public folder.

    RewriteCond %{REQUEST_URI} !^/\webmail # Something like this should work
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
1 like

Please or to participate in this conversation.