WordPress에 .htaccess를 추가하면 500 내부 서버 오류가 발생함

WordPress에 .htaccess를 추가하면 500 내부 서버 오류가 발생함

내 WordPress 웹사이트를 새로운 전용 호스트로 마이그레이션하고 있습니다.

자산을 성공적으로 이동하고 이를 WordPress 데이터베이스로 가져왔습니다.

wp_options를 임시 도메인 이름으로 업데이트했습니다(전환 준비가 될 때까지).

하지만 .htaccess 파일을 추가하면 'http://xxxxx.com/wp-admin/'

제가 봤던 페이지인데..

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

.htaccess 파일은 다음과 같습니다…

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

나는 이것이 부분적으로 포트 80에 대한 Apache 웹 서버 지시어에서 놓친 부분 때문이라고 생각합니다.

이건 내가 설정한건데...

DocumentRoot "/usr/share/wordpress"   
<Directory "/usr/share/wordpress">
 Allow From All                                           
 Options None                                             
 Require all granted                                      
</Directory>

이것은 내 Apache 설정입니다 ..

아파치

현재 포트 443에 대해 설정된 지시문이 없습니다. 단지 이것뿐입니다.

DocumentRoot /usr/share/wordpress 
ErrorLog /var/log/httpd/error.log      
CustomLog /var/log/httpd/access.log combined 
UseCanonicalName off 

서버 이전 전까지 인증서 값을 제거해 두었습니다.

내가 무엇을 놓치고 있나요?

답변1

Apache 구성에서 "AllowOverride All"을 추가하고 저장한 후 Apache를 다시 시작한 후 다시 시도하십시오.

전임자:

DocumentRoot "/usr/share/wordpress"   
<Directory "/usr/share/wordpress">
 Allow From All
 AllowOverride All                                           
 Options None                                             
 Require all granted                                      
</Directory>

자세한 내용은 다음을 참조하세요. https://httpd.apache.org/docs/2.4/mod/core.html#AllowOverride

관련 정보