Need help converting Free Fat Framework .htaccess file to Caddy rewrite

Hello, I need help converting below Free Fat Framework .htaccess file over to Caddy rewrite.
I am using Caddy 0.8.3

Free Fat Framework .htaccess file

Enable rewrite engine and route requests to framework

RewriteEngine On

Some servers require you to specify the RewriteBase directive

In such cases, it should be the path (relative to the document root)

containing this .htaccess file

RewriteCond %{REQUEST_URI} .ini$
RewriteRule .ini$ - [R=404]

RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php [L,QSA]
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]

Thank you and a nice day.

Hey Chris, please format your post using backticks (`) on their own line for the code blocks. Thanks

Try the following, it’s for Laravel but I think it will work:

rewrite {
        r .*
        ext /
        to /index.php?{query}

Taken from:

Hi Nixtren, the rewrite worked for the Fat-Free Framework, million thanks :smiley:

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.