wordpress是支持这种访问的 https://1024.ee/?p=6767
![](https://cdn.1024.ee/wp-content/uploads/2021/02/mini_-2021-02-07-at-20.39.06-1024x739.png)
那么我就想把访问 https://1024.ee/6767.html 自动重写成 https://1024.ee/?p=6767,实现伪静态
只需要在nginx的配置当中写上
# \d 代表数字, + 意思是至少1个以上
rewrite ^/(\d+).html https://1024.ee/?p=$1
![](https://cdn.1024.ee/wp-content/uploads/2021/02/mini_-2021-02-07-at-20.27.08-1024x693.png)
测试一下
![](https://cdn.1024.ee/wp-content/uploads/2021/02/mini_-2021-02-07-at-20.30.51-1024x815.png)
wordpress是支持这种访问的 https://1024.ee/?p=6767
那么我就想把访问 https://1024.ee/6767.html 自动重写成 https://1024.ee/?p=6767,实现伪静态
只需要在nginx的配置当中写上
# \d 代表数字, + 意思是至少1个以上
rewrite ^/(\d+).html https://1024.ee/?p=$1
测试一下