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

Respect's avatar

Hello Friends How to add exception to this .htaccess code for subdomins

Hello Friends How to add exception to this code for subdomins

i using this code to deploy laravel app with out moving files from public folder but this code block any sub domin created in the host how to add an exception to allow sub domin works Thanks

DirectoryIndex index.php
<IfModule mod_rewrite.c>

    RewriteEngine On
    RewriteBase /

    RewriteRule ^$ public/index.php [L]

    RewriteRule ^((?!public/).*)$ public/ [L,NC]

</IfModule>
0 likes
1 reply

Please or to participate in this conversation.