mod_rewrite를 사용하여 하위 도메인을 쿼리 매개 변수 집합으로 덮어 쓰려고합니다.올바른 매개 변수가 일치하지 않음
예를 들어 sub.domain.com
은 index.php?option=com_pages&layout=swf
으로, sub.domain.com/about
은 index.php?option=com_pages&layout=swf/about
으로 지정해야합니다.
RewriteCond %{HTTP_HOST} ^sub\.domain\.com
RewriteRule ^(.*)$ index.php?option=com_pages&layout=swf/$1 [L,NC,QSA]
그것은 sub.domain.com
제대로 작동하지만 sub.domain.com/about
, 나는 index.php?option=com_pages&layout=swf/index.php
로 이동 그리고 난 왜 확실하지 않다 :
나는 현재이 있습니다.
여기 몇 가지 자습서를 준비했지만 아직 보지 못했습니다. 모든 도움을 주시면 감사하겠습니다.
차이점이 있다면 Apache 2.2입니다.
편집 : 나는 내 서버에서 살펴 보았다 그리고 나는 $ _SERVER에 대해 다음을 받고 있어요 :
[REDIRECT_QUERY_STRING] => option=com_pages&layout=swf/about
[QUERY_STRING] => option=com_pages&layout=swf/index.php&option=com_pages&layout=swf/about
잘 모르겠어요 자사가 그렇게 연결된되는 이유.