1.系统安装时报404错误

问:系统安装时,已经跳转到安装页面,但页面不显示或报404错误?


答:伪静态未配置所导致,请参照以下规则配置好伪静态。商业版可在源码包根目录下的伪静态规则文件中找到规则。各个服务器规则的配置不一致,如不了解配置方法可咨询官方客服,或到社区中留言。


URL重写规则如下:

[APACHE]

<IfModule mod_rewrite.c>
Options +FollowSymLinks
IndexIgnore */*

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php
</IfModule>

[Nginx]

location /admin {
  try_files $uri $uri/ /admin/index.php$is_args$args;
}

location /home {
  try_files $uri $uri/ /home/index.php$is_args$args;
}

location /mob {
  try_files $uri $uri/ /mob/index.php$is_args$args;
}

location /install {
  try_files $uri $uri/ /install/index.php$is_args$args;
}

location /api {
  try_files $uri $uri/ /api/index.php$is_args$args;
}

location /h5 {
  try_files $uri $uri/ /h5/index.html;
}

location / {
  try_files $uri $uri/ /index.php$is_args$args;
}

[IIS]

<rewrite>
<rules>
 <rule name="rewrite_admin_rewrite" stopProcessing="true">
  <match url="admin/?(.*)"/>
  <conditions>
   <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true"/>
   <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true"/>
  </conditions>
  <action type="Rewrite" url="admin/index.php" appendQueryString="true"/>
 </rule>
 <rule name="rewrite_home_rewrite" stopProcessing="true">
  <match url="home/?(.*)"/>
  <conditions>
   <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true"/>
   <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true"/>
  </conditions>
  <action type="Rewrite" url="home/index.php" appendQueryString="true"/>
 </rule>
 <rule name="rewrite_mob_rewrite" stopProcessing="true">
  <match url="mob/?(.*)"/>
  <conditions>
   <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true"/>
   <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true"/>
  </conditions>
  <action type="Rewrite" url="mob/index.php" appendQueryString="true"/>
 </rule>
 <rule name="rewrite_install_rewrite" stopProcessing="true">
  <match url="install/?(.*)"/>
  <conditions>
   <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true"/>
   <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true"/>
  </conditions>
  <action type="Rewrite" url="install/index.php" appendQueryString="true"/>
 </rule>
 <rule name="rewrite_h5_rewrite" stopProcessing="true">
  <match url="h5/?(.*)"/>
  <conditions>
   <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true"/>
   <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true"/>
  </conditions>
  <action type="Rewrite" url="h5/index.html" appendQueryString="true"/>
 </rule>
 <rule name="rewrite_rewrite" stopProcessing="true">
  <match url="." ignoreCase="false"/>
  <conditions>
   <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true"/>
   <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true"/>
  </conditions>
  <action type="Rewrite" url="index.php" appendQueryString="true"/>
 </rule>
</rules>
</rewrite>