How to define nginx pseudo static rule?

10-25-2023

1. nginx Pseudo-dynamic Delimitation Rules

rewrite ^(.*)/tags.html $1/tags.php; rewrite ^(.*)/tags/(.*)-1.html $1/tags.php? /$2/$3;

or

rewrite ^([^.]*)/tags.html $1/tags.php; rewrite ^([^.]*)/tags/(.*)-([0-9]+).html $1/tags.php? /$2/$3;

2. Provisions on False Audio of. htaccess File

RewriteBase / RewriteRule ^tags.html$ /tags.php$1 RewriteRule ^tags/(.*)-([0-9]+).html$ /tags.php? /$1/$2

3. Web site. config file under IIS, and pseudo message rules:

<rule name="Imported Rule tags 1"><match url="^(.*/)*tags.html$" ignoreCase="false" /><action type="Rewrite" url="{R:1}/tags.php" /></rule>

<rule name="Imported Rule tags 2"> <match url="^(.*/)*tags/([^-]+)-([0-9]+).html$" ignoreCase="false" /> <action type="Rewrite" url="{R:1}/tags.php?/{R:2}/{R:3}" appendQueryString="false" /> </rule>

4. Pseudodynamic regulation of httpd.ini file.

RewriteRule ^(.*)/tags.html $1/tags.php RewriteRule ^(.*)/tags/(.*)-([0-9]+).html $1/tags.php? $2/$3

Copyright Description:No reproduction without permission。

Knowledge sharing community for developers。

Let more developers benefit from it。

Help developers share knowledge through the Internet。

Follow us