문제

RewriteEngine on
RewriteCond %{REQUEST_URI} !^/index\.php
RewriteRule ^(.*)$ index.php?q=$1 [L]

이렇게하면 모든 URL을 index.php? q = {url}에 다시 작성해야합니다. 그래도, http://www.domain.com/ 빈 페이지 만 표시하십시오. index.php로 다시 작성하려면 어떻게해야합니까? (http://www.domain.co.il/index.php 빈 페이지가 표시되지 않습니다 ..)

BTW :이 코드의 리디렉션과 다시 쓰지 않는 이유는 무엇입니까?

감사.

도움이 되었습니까?

해결책

설정해야합니다 DirectoryIndex 당신의 .htaccess 파일:

DirectoryIndex index.php

다른 팁

RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/$ index.php?q=$1 [L]
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top