Home >Backend Development >PHP Tutorial >各位高手,帮忙想一下,我要用nginx伪静态,http://127.0.0.1/phurl/vP3g8 http://127.0.0.1/phurl?aid=

各位高手,帮忙想一下,我要用nginx伪静态,http://127.0.0.1/phurl/vP3g8 http://127.0.0.1/phurl?aid=

WBOY
WBOYOriginal
2016-06-23 14:15:06992browse

各位高手,帮忙想一下,我要用nginx伪静态,http://127.0.0.1/phurl/vP3g8  http://127.0.0.1/phurl?aid=vP3g8 怎么写?


回复讨论(解决方案)

nginx下的 你试试行不 不行当没说
rewrite ^/phurl/([0-9a-z]+)$ /phurl?aid=$1 last;

还是不得行  NGINX  是不是没有要什么配置呢

location /phpurl/ {
rewrite ^/phurl/(.*)$ /phurl?aid=$1 last;
}

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
Previous article:PHP生成业务报表Next article:PHP 中的“新”字