안녕하세요 StackOverflow 커뮤니티, 나는 "너무 많은 리디렉션"오류를 해결하기 위해 stackoverflow에서 많이 검색했습니다. 그러나 도움이되는 것을 찾을 수 없습니다. .htaccess와 UserAgent 조건을 통해 모바일 디렉토리로 리디렉션하고 싶습니다..htaccess 301 모바일 디렉토리로 리디렉션 - 너무 많은 리디렉션 오류
RewriteEngine On RewriteCond %{HTTP_USER_AGENT} "android|blackberry|iphone|ipod|ipad|iemobile" [NC] RewriteRule ^(.*)$ http://mysite.com/mobile/$1 [R=301,L]
리디렉션 자체가 잘 작동하지만, URL은 http://mysite.com/mobile/mobile/mobile/mobile/mobile/mobile/mobile/mobile 같은 무언가로 성장 그래서 오류를 얻을 때까지 모바일 브라우저 루프/모바일을 추가처럼 그 보인다 "나오지 않았어 :이처럼 보이는 높은 투표 솔루션을 찾을 수 리디렉션이 너무 많아 사이트를 열지 못했습니다. "
RewriteCond %{HTTP_USER_AGENT} "android|blackberry|iphone|ipod|ipad|iemobile" [NC]
RewriteRule ^((?!mobile/).*)$ /mobile/$1 [R=301,L]
문제는 무조건 접두사하고 있다는 점이다 :이와 RewriteRule
교체, 사전에 루카스 티토을
AddType video/ogg .ogv AddType video/mp4 .mp4 AddType video/webm .webm RewriteEngine On RewriteCond %{HTTP_USER_AGENT} "android|blackberry|iphone|ipod|ipad|iemobile" [NC] RewriteRule ^(.*)$ http://mysite.com/mobile/$1 [R=301,L]
감사를
여러 번 발생했습니다. htaccess가 http://mysite.com/mobile에 어떤 폴더 안에있을 수 있습니까? 이는 재귀 적 재 지정입니다. – opalenzuela