# Prevent access to hidden files
<FilesMatch "^\.">
    Order allow,deny
    Deny from all
</FilesMatch>

# Prevent directory browsing
Options -Indexes

# Default document
DirectoryIndex index.php

RewriteEngine On
RewriteBase /barber/

# If file/directory exists, serve it directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Otherwise, route through index.php
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
