두 개의 Codeigniter 사이트가 있습니다. 하나는 다른 사이트의 하위 디렉토리에 있습니다. 나는 두 htaccess 파일을 수정하여 index.php를 제거하는 데 도움이 필요하다.두 Codeigniter 사이트의 index.php 제거 및 하위 도메인 처리 (다른 하나가있을 때)
RewriteEngine On
# Rewrite the main domain
RewriteCond %{HTTP_HOST} !test.subdomain.domain.com
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]
# Rewrite the sub domain
RewriteCond %{HTTP_HOST} test.subdomain.domain.com
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/(.*)$ /app_staging/index.php?/$1 [L]
이것은 index.php를 제거입니다 :
첫 번째 사이트는 http://subdomain.domain.com
이는 /home/sites/subdomain/www/html/
에서 내 .htacess 파일입니다 /home/sites/subdomain/www/html/app_staging/
에, /home/sites/subdomain/www/html/
에 http://test.subdomain.domain.com
삶을 두 번째를 저장 첫 번째 사이트에서부터 모든 것이 정상입니다. 두 번째 사이트에서는 기본 컨트롤러 양식 http://test.subdomain.domain.com
을로드 할 수 있지만 후속 페이지는 서버에서 404를 반환합니다. 다음 단계는 무엇입니까?
당신이 시도 주어진 대답을 줄 수 있을까요? 모든 의견을 주시면 감사하겠습니다. –
@HashemQolami의 답변을 잊어 버리지 않았습니다. 서버의 htaccess와 관련된 잠재적 인 문제를 조사하고 있습니다. 나는 당신의 대답이 한번 해결되는 방법을 알려 줄 것입니다. :) – Zoe