程序伪静态文档

程序伪静态文档,适用于序智应用Pro

纠错上报
伪静态配置如下:


imageApache:


Apache:



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

RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} ^/(apiv1|apiv2|apiv3)/
RewriteRule ^(apiv1|apiv2|apiv3)/(.*)$ index.php?/$2 [QSA,PT,L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/(apiv1|apiv2|apiv3)/
RewriteRule . /index.php [L]
</IfModule>

Nginx:


# nginx configuration by winginx.com

location / {
try_files $uri $uri/ @rewrite;
}

location @rewrite {
rewrite ^/(apiv1|apiv2|apiv3)/(.*)$ /index.php?/$2 last;
rewrite ^ /index.php last;
}

location ~ \.php$ {
include fastcgi_params;
fastcgi_pass unix:/var/run/php/php-fpm.sock; # 默认 PHP-FPM 套接字路径
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}

location ~ /\.ht {
deny all;
}