对信系统的伪静态设置
第一步:登录宝塔,点击网站设置。
第二步:设置伪静态规则。
这里面的规则已经包含PC端 和 H5 端。
location ~* \.(eot|ttf|woff|svg|otf|woff2)$ { add_header Access-Control-Allow-Origin *; } location / { # 这里配置单个代理跨域,跨域配置 add_header 'Access-Control-Allow-Origin' *; add_header 'Access-Control-Allow-Credentials' 'true'; add_header 'Access-Control-Allow-Methods' *; add_header 'Access-Control-Allow-Headers' *; # *指允许所有,也可指定,例如:http://10.0.0.56 add_header Access-Control-Allow-Methods GET,POST,PUT,DELETE,OPTIONS; if (-f $request_filename) { break; } if ($request_filename ~* "\.(js|ico|gif|jpe?g|bmp|png|css)$") { break; } if (!-e $request_filename) { rewrite . /index.php last; } } location /m/ { if (-f $request_filename) { break; } if ($request_filename ~* "\.(js|ico|gif|jpe?g|bmp|png|css)$") { break; } if (!-e $request_filename) { rewrite . /m/index.html last; } }