Home  >  Article  >  Backend Development  >  The php page of the website can be opened, but what is the reason why html, txt, etc. cannot be opened? css and js open normally

The php page of the website can be opened, but what is the reason why html, txt, etc. cannot be opened? css and js open normally

WBOY
WBOYOriginal
2016-08-20 09:04:181564browse

The php page of the website can be opened, but what is the reason why html, txt, etc. cannot be opened? css and js open normally
lnmpa environment
The php page of the website can be opened, but what is the reason why html, txt, etc. cannot be opened? css and js open normally

Firefox prompts like this:
The php page of the website can be opened, but what is the reason why html, txt, etc. cannot be opened? css and js open normally

Reply content:

The php page of the website can be opened, but what is the reason why html, txt, etc. cannot be opened? css and js open normally
lnmpa environment
The php page of the website can be opened, but what is the reason why html, txt, etc. cannot be opened? css and js open normally

Firefox prompts like this:
The php page of the website can be opened, but what is the reason why html, txt, etc. cannot be opened? css and js open normally

First check whether the URL is correct, then check whether the file exists, and then check the permissions. (In fact, the easiest way is to directly check the server log)

It may be redirected, because css and js are static resources, so they are not redirected.
If the server used is apache, then check .htaccess in the root directory. Add html, txt Go in

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn