# Route all requests to CodeIgniter's front controller (public/index.php)
# Use this when your document root is the project root (e.g. localhost/project/ip2location/)
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /project/ip2location/

    # If the request is for a real file or directory, serve it
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    # Otherwise send everything to index.php
    RewriteRule ^(.*)$ public/index.php/$1 [L,QSA]
</IfModule>
