July 30, 20205 yr IPS 4.5若用手机APP,则原先的Nginx伪静态不适用 因为要再添加api目录的伪静态 我还没找到Nginx伪静态如何添加api目录的伪静态写法 本论坛今日先改用Apache服务器 IPS 4.5 根目录的Apache伪静态 .htaccess <IfModule mod_rewrite.c> Options -MultiViews RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteRule \.(js|css|jpeg|jpg|gif|png|ico|map)(\?|$) /404error.php [L,NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> IPS 4.5 api目录的Apache伪静态 .htaccess <IfModule mod_setenvif.c> SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0 </IfModule> <IfModule mod_rewrite.c> Options -MultiViews RewriteEngine On RewriteBase /api/ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule .* index.php [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L] </IfModule> 最后,论坛后台的REST & OAuth选项要能打开,可以看到手机APP Edited July 30, 20205 yr by Jack
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.