Redirect 301 /resort.php/FOO/BAR http://www.sitename.com.com/index.php
RewriteRule ^/direct/(.*) /direct/$1 [QSA,L] # access non i18n files directly
RewriteRule ^/([a-z]{2}\/.*) /$1 [QSA,L] #any language subdirectory should be left alone
RewriteRule ^/(.*\/$) /en/$1index.php [QSA,L] #fix for links ending in/
RewriteRule ^/(.*\.php) /en/$1 [QSA,L] #any php file with no language subdirectory redirects to the default language
첫 번째 Redirect 301이 홈페이지로 이동하지 않는 이유는 무엇입니까? 교환 할 때 ..Apache - 다시 쓰기 규칙 혼동
RewriteRule ^/resort.php(.*) http://www.sitename.com/index.php [R=301,L]
작동이 시작됩니다. 나는 규칙이 많아서 하나가되고 다른 하나는 점프하기 때문에 나는 확신한다. 그러나 나는 다소 잃어 버렸고 아마도 전문가는 이것을 더 분명하게 설명 할 수 있었다.
내 디렉토리 구조는 그래서 같다 : 루트에는 /index.php 없다
/en/index.php
/direct/
, 나는 처음 엔로 리디렉션하고 있습니다.
아, 나는 그것이 일종의 충돌이라는 것을 알고있었습니다. –