智慧农场服务器配置文件配置

[复制链接]
查看: 6427|回复: 0

30

主题

0

回帖

357

积分

管理员

积分
357
发表于 2019-12-4 10:50:19 | 显示全部楼层 |阅读模式
 
私有部署开源版配置文件

apache
  1. <IfModule mod_rewrite.c>
  2.   RewriteEngine On
  3.   RewriteBase /
  4.   RewriteRule ^index\.html$ - [L]
  5.   RewriteCond %{REQUEST_FILENAME} !-f
  6.   RewriteCond %{REQUEST_FILENAME} !-d
  7.   RewriteRule . /index.html [L]
  8. </IfModule>
复制代码
nginx
  1. location / {
  2.   try_files $uri $uri/ /index.html;
  3. }
复制代码
Internet Information Services (IIS)
1.安装 IIS UrlRewrite
2.在你的网站根目录中创建一个 web.config 文件,内容如下:
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <configuration>
  3.   <system.webServer>
  4.     <rewrite>
  5.       <rules>
  6.         <rule name="Handle History Mode and custom 404/500" stopProcessing="true">
  7.           <match url="(.*)" />
  8.           <conditions logicalGrouping="MatchAll">
  9.             <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
  10.             <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
  11.           </conditions>
  12.           <action type="Rewrite" url="/" />
  13.         </rule>
  14.       </rules>
  15.     </rewrite>
  16.   </system.webServer>
  17. </configuration>
复制代码


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 客服热线:023-8825 6967
  • 联系电话:187 2323 7733
  • 工作时间:周一到周五 9:00-18:00

关注我们

Copyright   ©2017-2022  坤典科技  技术支持:坤典科技团队     ( 渝ICP备17004996号-1 )