# ============================================================================
# Rank Your App — root fallback
# ============================================================================
# Only used if you copy the WHOLE project into C:\xampp\htdocs (no vhost).
# Redirects every request into the public/ folder where the front controller
# lives. If you use the vhost approach (docroot = public/), this file is
# simply never reached and can be ignored.
#
# NOTE: the RewriteCond is essential — without it, requests that are already
# inside /public/ get rewritten to /public/public/ (404 / loop).

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^$ public/ [L]
    # Keep cron.php directly reachable (web-cron for shared hosting)
    RewriteRule ^cron\.php$ - [L,NC]
    RewriteCond %{REQUEST_URI} !/public/ [NC]
    RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
