Make sure your php errors are visible.
I had this problem when trying to set base_url for Code Igniter when I was working with localhost. I looked at the htaccess file, checked that mod_rewrite is enabled, tried to change base_url, but everything failed.
The solution was to ensure that the environment was configured to be developed in the main index.php file and to ensure that $ config ['log_threshold'] = 4; set in config.php.
After that, my php errors appeared. I forgot to switch the development environment for a new build of the website.
source share