2009-11-02 9 views
0
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는 빈 페이지를 표시하지 않습니다.)URL 다시 작성 도움

동의어 :이 코드는 리디렉션되지 않고 다시 쓰지 않습니다. 이유는 무엇입니까?

감사합니다.

답변

2

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

DirectoryIndex index.php 
0
RewriteEngine on 
RewriteBase/
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteRule ^([^/]+)/$ index.php?q=$1 [L]