0
특정 URL에서 요청을하는 경우에만 한 폴더에서 다른 폴더로 모든 URL을 다시 작성해야합니다. 그래서도메인이 일치하는 경우 .htaccess를 사용하여 한 폴더에서 다른 폴더로 리디렉션
:
www.example.com/blog/path/to/article에 갈
요구 :
www.example.com/new-blog/path/to/
www.otherdomain.com/blog/path/to/article
012 : 기사는 그러나 요청에 대한 통하여 오면 말 때문에, example.com 조건부 할 필요가
새 폴더로 리디렉션 할 필요가 없습니다.
"blog"및 "new-blog"폴더에는 두 개의 별도 Wordpress 설치가 포함되어 있습니다. 이 코드는 현재 루트 공용 폴더에 있으며 작동하지 않는 코드는 다음과 같습니다.
RewriteCond %{HTTP_HOST} ^www\.example\.com [NC]
RewriteRule ^blog(.*) /new-blog$1 [L,R]
도움이 되었습니까? 감사.
RewriteCond %{HTTP_HOST} ^new\.example\.com$ [NC]
RewriteRule (.*) http://new.example.com/our-happy-place/$1 [L,R]
: