나는 새로운 도메인으로 이전 도메인을 리다이렉션하려고 시도하지만, 제자리에 넣어야 할 몇 가지 규칙이 있으며 지금까지 나는 그걸 제대로 관리하지 못했습니다.아파치 모드 다시 쓰기 규칙 특별 조건
www.old-domain.com/sheffield/ www.old-domain.com/london :
이전 도메인 예를 들어 www.old-domain.com이 같은 영국의 도시 후 폴더 이름의 수백이있다/ www.old-domain.com/essex/
각 폴더 안에는 index.html 파일과 가능한 다른 디렉 토리스 및 파일이 있습니다.
이전 도메인/마을이 새 도메인/마을에 매핑되지만 이전 도메인/town/index.html이 새 도메인 끝에 index.html을 삽입하지 않도록 이러한 방법으로 새 도메인에 리디렉션해야합니다. 타운 이후의 경로는 index.html 이외의 것으로 새로운 도메인의 경로로 리디렉션됩니다.
죄송 합니다만 설명하기가 쉽지 않으며 읽지 않고 쉽게 찾을 수 없습니다.
www.old-domain.com/sheffield => www.new-domain.com/sheffield
www.old-domain.com/sheffield/ => www.new-domain.com/셰필드/
www.old-domain.com/sheffield/index.html => www.new-domain.com/sheffield/
www.old-domain.com/sheffield/main.html => www.new-domain.com/sheffield/main.html
www.old-domain.com/sheffield/innerFolder/ => www.new-domain.com/sheffield/innerFolder
www.old-domain.com/sheffield/innerFolder/file.php => www. new-domain.com/sheffield/innerFolder/file.php
는굵게 두 사람은 나는 이것에 의해 작동 얻을 관리 위 :
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^sheffield/(.*)$ http://www.new-domain.com/sheffield/$1 [R=301,L]
그러나 임 정말 old-domain.com/sheffield 얻기 위해 고군분투 /index.html 새 도메인에 .index.html을 넣지 마십시오.
더 이상 mod 재 작성 튜토리얼을보고 머리카락을 뽑기 전에 다른 사람이이 문제를 해결할 수 있습니까?
다르게 전달 될 디렉토리가 없으면 추가로 간단하게 만들려고합니다. RewriteRule^(. *) \/index \ .html http://www.new-domain.co.uk/$ 1/[R = 301, L] RewriteRule^(. *) $ http://www.new-domain.co.uk/$1 [R = 301, L] –
감사합니다. 당신의 논리를 봅니다. 한 번에 모든 위치를 리디렉션하지 않으므로이 작업을 잠시 할 수 없습니다. 여기서 우리는 대략 SEO 순위에 대해 걱정하고 있습니다. 그래서 약 3500 개의 위치 중 약 10 개 지점에서 해보았습니다.하지만 스왑을 끝낼 때마다 확실히 돌아와서 다시 귀하의 사례를 살펴볼 것입니다. 시간 내 주셔서 다시 한 번 감사드립니다. – azzy81