業務需求描述:
實際業務不存在index.html,需要重寫通路index.php
URL為index.html,而實際通路的是index.php,對外被認為是html靜态頁面
①修改配置
shell > vim /usr/local/nginx/conf/nginx.conf
添加配置
rewrite /index.html /index.php last;
③重載配置測試通路
![](https://img.laitimes.com/img/_0nNw4CM6IyYiwiM6ICdiwiIyVGduV2YfNWawNyZwpmLxgzM5QTM0UTM0EDNwEjMwIzLc52YucWbp5GZzNmLn9Gbi1yZtl2Lc9CX6MHc0RHaiojIsJye.jpg)
業務需求描述:
實際業務不存在index.html,需要重寫通路index.php
URL為index.html,而實際通路的是index.php,對外被認為是html靜态頁面
①修改配置
shell > vim /usr/local/nginx/conf/nginx.conf
添加配置
rewrite /index.html /index.php last;
③重載配置測試通路