子页面始终打开域根

I'm having a strange problem with a new PHP page I´m writing. Everything seems to be loading/redirected to the domain root page.

  • domain.com loads fine
  • domain.com/page or domain.com/page/index.php always loads "domain.com" while retaining the /page/index.php in the browser URL.
  • Even domain.com/some_random_text loads "domain.com"

I suspected the .htaccess file, but there is none to be found. There are no redirects in the PHP code.

If I remove the domain.com/index.php file I get an Internal Server Error when opening domain.com/page/index.php

This domain did have Wordpress installed, but I did uninstall that via cPanel.

First thing to notice is that the .htaccess file can be anywhere in the path that is handled by Apache. So check everywhere. This kind of redirect could be made only like that.

This can only be done by Apache, so you might also like to check the apache config if you are running on a virtual machine or dedicated server.

Also, not that it might have been a wildcard redirect, added by the cPanel, so check those settings. Though I think those actually just modify the root .htaccess file.

Based on the data you provided I cannot say more, but I don't think this is a common issue.