I'm trying to become my php files running without .php extension ending in browser and redirect all to non .php
I've already setup, that both available. With .php and without .php on browser. But now just need a rewrite.
Did u can help me out their?
location / { try_files $uri $uri $uri/ @extensionless-php; } location @extensionless-php { rewrite ^(.*)$ $1.php last; } Best regards
location / { index index.html index.htm index.php; } location ~ \.php$ { try_files $uri =404; }- whereindex index.html index.htm index.php;already defined in root directory and dont think try_files is for an rewrite ^^ On my side just the rewrite from .php to without is missing.