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

Sjoerrdd's avatar

Error 500 on subdomain?

Hello, I created an application for small business to generate paychecks.

How it works:

https://domain.com => Information about the product https://{subdomain}.domain.com => Client login

All clients will get there own subdomain, but it is only one codebase. (for the main and the subdomain)

on my localhost it works, but on (shared) hosting the subdomain returns an error 500.

(I can't move to a VPS, it is an intership project)

.htaccess file:

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/ [L]
</IfModule>

<Files .env>
Order allow,deny
Deny from all
</Files>

0 likes
1 reply
Snapey's avatar

Does your DNS resolve to the right place for all subdomains?

Please or to participate in this conversation.