apache/nginx配置

司令commander / 2023-06-15 / 原文

apache配置文件里修改如下

<IfModule mod_fcgid.c>
AddHandler fcgid-script .fcgi
FcgidProcessLifeTime 100000
FcgidIOTimeout 100000
FcgidConnectTimeout 100000
# to get around upload errors when uploading images increase the MaxRequestLen size to 15MB
MaxRequestLen 2097152000000
</IfModule>

php代码工程里.htaccess内容如下

<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^api/?(.*)$ api.php?s=$1 [QSA,PT,L]

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?s=$1 [QSA,PT,L]
</IfModule>