Word Press ��Apache������nginx ����ҳ�ⶼ��ʾ404

wangping
Thu, 17 Sep 2020 06:17:38 +0000
wordpress

�������http��С�ڴ������Ǳ��������Ը�����nginx��Ȼ���������ˣ�Word Press ��Apache������nginx ����ҳ�ⶼ��ʾ404��

������wordpress�ٷ��ă^�o�B��ͨ�^.htaccess���F�ģ���nginx�K��֧��.htaccess���o��ֻ���ھW���ҵ�wordpress�^�o�B�ķ�����

���ô��a���£�

location / {
        if (-f $request_filename/index.html){
               rewrite (.*) $1/index.html break;
        }
        if (-f $request_filename/index.php){
               rewrite (.*) $1/index.php;
         }
        if (!-f $request_filename){
               rewrite (.*) /index.php;
         }
}
rewrite /wp-admin$ $scheme://$host$uri/ permanent;