0
아래 규칙은 완벽하게 작동하지만 이전 사이트 URL은 .html이고 newsite는 그렇지 않습니다. 리디렉션 전에 .html을 제거 할 수 있습니까? 예 :Htaccess로 리디렉션하기 전에 .html을 제거하십시오.
www.oldsite.com/mypage.html
은
www.newsite.com/subdir/mypage/
예를 들어, 리디렉션됩니다
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www.oldsite.com$ [NC]
RewriteRule ^(.*)$ http://www.newsite.co.uk/subdir/$1 [R=301,L]