일부 URL이 htaccess 파일을 사용하여 리디렉션하려고합니다. .htaccess 리디렉션 문제 : 마지막 매개 변수가 자동으로 추가되었습니다.
내 htaccess로 파일
가 아래로이다 : 그것은 http://yourwebsitedomain.com/new-post-type/new-post-slug/old-post-slug/로 리디렉션되고, 그것은 http://yourwebsitedomain.com/new-post-type/new-post-slug/로 리디렉션해야
# 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>
Redirect /old-post-type/old-parent-post/old-post-slug/ /new-post-type/new-post-slug/
***** Some More URLs *****
# END WordPress
그러나 "이전 포스트 - 슬러그 /"자동으로 그렇게하지 마지막에 추가 왜 그런지 안다?
제안 사항이 있습니다.
Redirect 301 /old-post-type/old-parent-post/old-post-slug/ http://your-domain.com/new-post-type/new-post-slug/
이 작동합니다 :
WordPress를 사용하고있는 것 같습니다. 왜 '리디렉션 플러그인'을 설치하지 않으시겠습니까? –
단지 4 개 또는 5 개의 URL에 플러그인을 사용하는 것이 좋습니까? @HyderB. 침대가 아닌가? –