nginx pseudo static rewrite rule

  • 2020-05-06 12:12:19
  • OfStack


location / { 
### The following is a PHPCMS  Pseudo static rewrite The rules  
rewrite ^(.*)show-([0-9]+)-([0-9]+)\.html$ $1/show.php?itemid=$2&page=$3; 
rewrite ^(.*)list-([0-9]+)-([0-9]+)\.html$ $1/list.php?catid=$2&page=$3; 
rewrite ^(.*)show-([0-9]+)\.html$ $1/show.php?specialid=$2; 

#### The following is a PHPWind  Pseudo static rewrite The rules  
rewrite ^(.*)-htm-(.*)$ $1.php?$2 last; 
rewrite ^(.*)/simple/([a-z0-9\_]+\.html)$ $1/simple/index.php?$2 last; 
} 

This is from the linux advanced house blog

Related articles: