欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  php教程

nginx url重写

程序员文章站 2024-01-05 14:02:28
...

html|htm伪静态 无 location ~ \.(html|htm)$ {if ( !-e $request_filename ) { rewrite "^/(.+/)?([a-z-A-Z-0-9]+)(_[a-z-A-Z-0-9]+)*.(html|htm)$" /$1index.php?module=$2action=$3 last;}}

html | htm 伪静态
location ~ \.(html|htm)$ {
		if ( !-e $request_filename ) {
		    rewrite "^/(.+/)?([a-z-A-Z-0-9]+)(_[a-z-A-Z-0-9]+)*.(html|htm)$" /$1index.php?module=$2&action=$3 last;
		}
	}

上一篇:

下一篇: