<IfModule mod_rewrite.c>
    RewriteEngine On

    # 0. Purana /software/public/... prefix hatao -> public/... serve karo
    RewriteRule ^software/public/(.*)$ public/$1 [L]
    RewriteRule ^software/(manifest\.json|service-worker\.js)$ public/$1 [L]

    # 1. Sensitive files/folders block
    RewriteRule ^(\.env|\.git) - [F,L]
    RewriteRule ^(app|bootstrap|config|database|resources|routes|tests)(/|$) - [F,L]
    RewriteRule ^(artisan|composer\.(json|lock)|package\.json)$ - [F,L]

    # 2. Public folder me file hai to seedha serve karo
    RewriteCond %{DOCUMENT_ROOT}/public%{REQUEST_URI} -f
    RewriteRule ^ public%{REQUEST_URI} [L]

    # 3. Baaki sab Laravel ko
    RewriteCond %{REQUEST_URI} !^/public/
    RewriteRule ^ public/index.php [L]
</IfModule>

<IfModule mime_module>
    AddHandler application/x-httpd-ea-php82 .php .php8 .phtml
</IfModule>

Options -Indexes +FollowSymLinks
DirectoryIndex public/index.php
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php82” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php82 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
