Removing the .htaccess file and moving the logic to the main server file