nginx伪静态不工作,

qjc2022-08-06  580

server {
        listen 80;
        server_name _;
		autoindex on;
        index index.html index.htm index.php;
        root C:/phpEnv/server/nginx/html/;
	
		
		access_log  logs/access.log;
		
		location = /favicon.ico {
			log_not_found off;
			access_log off;
		}
		
		
		location /{
		if (!-e $request_filename) {
			rewrite ^((.*)/)?(.*).html$ $1/index.php last;
			}
		}
			
	}
转载请注明原文地址:https://www.wellcms.net/read-367.html
00
最新回复(1)
  • 这个帮不了你,肯定是环境问题。把伪静态放到 root 下面试试,对你这样没办法
    回复10

    • qjc作者
      2022-08-06 16:02:10
      @燃烧的冰我晕,每个网站有单独的配置文件,我设置到默认配置文件里了,难怪不生效