[nginx] How to configure nginx rewrite so that it will not cause the browser URL address to redirect?

WBOY
Release: 2016-08-08 09:24:05
Original
1853 people have browsed it
P in [L, P] in the apache rules means forced to be a proxy. Of course, the URL you request will not change. Nginx does not force rewriting as a proxy parameter. Of course, you can also use a flexible location method:

  1. location ~ ^/article/ {
  2.   rewrite ^/article/([^/.]+)-p([0-9]+)(/?)$ /c/article/$1/ article-list/$2.shtml break;
  3. proxy_pass http://cs.jkg.com;
  4. }
Copy code

The above introduces [nginx] how to configure nginx rewrite so that it will not cause the browser URL address to redirect? , including relevant content, I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template