diff --git a/htaccess b/htaccess index 6232e94..0238793 100644 --- a/htaccess +++ b/htaccess @@ -1,9 +1,6 @@ RewriteEngine On -# Redirect requests for .php files (as before) -RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^.]+)\.php [NC] -RewriteRule ^ /%1 [L,R=301] - -# Internally rewrite requests WITHOUT .php to the actual .php file (explicit) -RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_URI}.php -f -RewriteRule ^(.*)$ $1.php [L] \ No newline at end of file +# Remove .php extension from URLs +RewriteCond %{REQUEST_FILENAME} !-d +RewriteCond %{REQUEST_FILENAME}\.php -f +RewriteRule ^(.+)$ $1.php [L] \ No newline at end of file