Looking for definitive guide to remove /index.php/ from permanent links - WordPress admin area

Nowaday, my Caddyfile for WordPress:

rewrite {
	if {path} not_match ^((\/wp)?(\/wp-admin))(\/network)?
	to {path} {path}/ /index.php/{query}

I can explain the regex from if:

  • (\/wp)? gives me the option to use Roots.io Bedrock or default WordPress installation
  • (\/wp-admin) is a universal required path
  • (\/network)? gives me the option to enable multisite (subdomain or subdirectory - anyway, the network path is required to superadmin)

The issue:

Using Apache (htaccess) or NGINX (conf), inside wp-admin/options-permalink.php we have something like that:

  • Post name: scheme://domain.tld/post-example/

Using Caddy, with inumerous variations for Caddyfile (dozens, at least), we have something like that:

  • Post name: scheme://domain.tld/index.php/post-exemple/

After rewrite I did (above), the website navigation do not have the infamous /index.php/ as path explicited. Anyway, the permalink inside WP admin area still show the /index.php/. What I’m doing wrong?

Thank you very much.

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