# 1. Open up the server to show all files and folders Options +Indexes +FollowSymLinks # 2. Make the file listing look better (Optional) IndexOptions +FancyIndexing +HTMLTable +FoldersFirst +IgnoreCase # 3. Start the rewrite engine RewriteEngine On RewriteBase / # 4. THE GLOBAL ACCESS RULE # If the file doesn't exist in the root (public_html)... RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # ...look for it anywhere inside webb/webb/ # This allows quiztest.store/api.php to find /webb/webb/api.php RewriteRule ^(.*)$ webb/webb/$1 [L,NC] # 5. SPECIFIC UI MAPPING # Ensures your main panel path works without the 'webb/webb' prefix RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^kijaniquizzpanel/(.*)$ webb/webb/kijaniquizzpanel/$1 [L,NC]