Refactor .htaccess file and update URL routing logic

This commit is contained in:
2024-10-27 21:50:13 +01:00
parent 7d0749d692
commit 75eb9e0375
4 changed files with 38 additions and 11 deletions

View File

@@ -769,6 +769,11 @@ class S
$htaccess_data );
}
$htaccess_data .= PHP_EOL;
$htaccess_data .= 'RewriteCond %{REQUEST_FILENAME} !-f' . PHP_EOL;
$htaccess_data .= 'RewriteCond %{REQUEST_FILENAME} !-d' . PHP_EOL;
$htaccess_data .= 'RewriteRule ^ index.php [L]';
$fp = fopen( $dir . '.htaccess', 'w' );
fwrite( $fp, $htaccess_data );
fclose( $fp );