<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /

    # Handle homepage redirect if needed
    # RewriteRule ^$ /about-us.html [L]

    # First, try to serve the requested HTML file directly
    RewriteCond %{REQUEST_FILENAME}.html -f
    RewriteRule ^(.+?)/?$ $1.html [L]

    # If not a file or directory, try specific pages
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^about-us?$ /about-us.html [L]
    RewriteRule ^apply-job?$ /apply-job.html [L]
    RewriteRule ^blog?$ /blog.html [L]
    RewriteRule ^brief-form?$ /brief-form.html [L]
    RewriteRule ^careers?$ /careers.html [L]
    RewriteRule ^contact-us?$ /contact-us.html [L]
    RewriteRule ^job-detail?$ /job-detail.html [L]

    # If no specific matches, serve index.html
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.html [L]
</IfModule>