1
.htaccess 파일을 Apache 2.2.25로 마이그레이션하려고합니다. .htaccess 파일은 regex의 변경으로 인해 이전 버전과 Apache 2.2.25의 새 버전과 호환되지 않습니다.Apache 2.2 .htaccess 파일 마이그레이션 - 정규식 오류
나는 약간의 연구를했지만, 슬프게도 나는 무엇을 바꿔야 하는지를 알 수 없었다.
Apache 오류 로그에 다음 오류가 표시됩니다.
.htaccess : 정규 표현식을 컴파일 할 수 없습니다.
다음은 .htaccess 파일입니다. 이 "RedirectMatch 301"은 문제의 원인이라고 생각합니다.
RedirectMatch 301 ^/test/?$ http://www.domain.com/
RedirectMatch 301 ^/test/products/?$ http://www.domain.com/products/
RedirectMatch 301 ^/test/products/about/?$ http://www.domain.com/products/about/
다음은 정상적으로 작동하는 것으로 보이며 Apache 오류 로그에 오류가 생성되지 않습니다. 대신이 사용
#Wordpress configuration and force www
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
RewriteCond %{HTTP_HOST} ^domain\.de$ [NC]
RewriteRule ^(.*)$ http://www.domain.de/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^domain\.co\.in$ [NC]
RewriteRule ^(.*)$ http://www.domain.co.in/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^domain\.co\.uk$ [NC]
RewriteRule ^(.*)$ http://www.domain.co.uk/$1 [L,R=301]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
모두 괜찮습니다. 컨테이너에 ''과 같은 것이 없습니까? –