---
title: "nginx url重写记录"
author: "sinykk"
date: "2013-09-20T22:40:07Z"
tags: []
categories: ["编程语言"]
slug: "nginx-url"
draft: false
lastmod: "2013-09-20T22:44:35Z"
id: 1944375
url: "https://sinykk.iteye.com/blog/1944375"
---

nginx版本 1.2.7

在写nginx url重写时总是出错，记录如下：


不对：
location / {
			rewrite ^(.*)-htm-(.*)$ $1\.php\?Rurl=$2 last;
		}

 
对的：
location / {
			rewrite ^(.*)-htm-(.*)$ $1.php?Rurl=$2 last;
		}