Every time I try and visit the index.php file on my website, it automatically redirects me to an index.html page. I have no redirects in .htaccess. My wordpress site is in a subdomain, but it redirects me to the main domain every time. How can I get rid of this redirect?
Every time I try and visit the index.php file on my website, it automatically redirects me to an index.html page. I have no redirects in .htaccess. My wordpress site is in a subdomain, but it redirects me to the main domain every time. How can I get rid of this redirect?
"Redirect" from index.php to index.html might be caused by your apache settings. If you have index.html before index.php in your apache config file and you have both of these files in your folder, it will go for the index.html.
Try to add this to your .htaccess file (index.php preferred over index.html)
DirectoryIndex index.php index.html
or change it in your apache config file. On Mac:
sudo nano /etc/apache2/httpd.conf
and look for DirectoryIndex.