Could someone help me 'convert' this .htaccess file?

I don’t even know if I need to convert it to some redir's but either way, here it is:

Options +FollowSymLinks
RewriteEngine On

RewriteCond %{SCRIPT_FILENAME} !-d
RewriteCond %{SCRIPT_FILENAME} !-f

RewriteRule ^.*$ ./index.php

This one’s pretty simple - all it does is rewrite everything to index.php if it’s not a file or a folder.

In Caddy you can’t explicitly check for the existence of a file or folder, but what you can do is tell it to try to serve, in order;

  1. The request as a file
  2. The request as a folder
  3. Index.php

It looks like this:

rewrite {
    to {path} {path}/ /index.php
1 Like

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