1.nginx使用伪静态直接在配置文件中写规则,并不需要像apache要开启模块(mod_rewrite)才能进行伪静态。在server里面写入您的规则,/etc/init.d/nginx restart重启即可
2.如果是301重定向找到站点配置文件,列如我的test1.conf 找到server在域名后添加rewrite如下:
rewrite ^/(.*)https://www.pzidc.com/$1 permanent;
Copyright © 2013-2019 Pzidc.com All Rights Reserved. 普泽云 版权所有 陕西云游四海网络科技有限公司 陕ICP备18000501号
《中华人民共和国增值电信业务经营许可证》B1-20182862