RewriteEngine On #RewriteBase /mse_api/public # 1. Prevent directory browsing Options -Indexes # 2. If the request is NOT a real directory... RewriteCond %{REQUEST_FILENAME} !-d # 3. ...and is NOT a real file... RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f # 4. ...send the request to index.php RewriteRule ^ index.php [L]