2012-12-03 4 views
1

천천히 내 정신을 파괴하는 .htaccess 문제가 있습니다. 우리 프로젝트에는 404.php가있는 루트 폴더와 이라는 명시적인 서브 디렉토리이 있습니다. 서브 디렉토리에는 처리를 수행하는 index.php이라는 파일이 있습니다.모드 재 작성, htaccess 및 패스

Options +FollowSymlinks 

RewriteEngine On 

ErrorDocument 404 /404.php 

가입 물리적 하위 디렉토리의 htaccess로 포함 :

RewriteEngine On 
RewriteOptions inherit 

Options +FollowSymlinks 
RewriteCond %{REQUEST_URI} ^/signup/page1$ [NC] 
RewriteRule (.*) signup/index.php?page=1 [NC,L] 

다시 쓰기 프로젝트는 루트 htaccess로 파일에는 다음이 포함 윈도우 7

에서 XAMPP를 사용하고 있습니다 아래 로그는 /signup/page1이 존재하지 않기 때문에 재 작성 모듈에서 확인할 수 있습니다. 누구든지이 문제의 원인에 대한 아이디어가 있습니까?

10.1.1.201 - - [03/Dec/2012:15:06:58 +1100] [testsite.com/sid#463bd0][rid#4412b10/initial] (1) [perdir C:/workspace/project/public/signup/] pass through C:/workspace/project/public/signup/page1 
10.1.1.201 - - [03/Dec/2012:15:06:58 +1100] [testsite.com/sid#463bd0][rid#4500fc0/initial/redir#1] (3) [perdir C:/workspace/project/public/] strip per-dir prefix: C:/workspace/project/public/404.php -> 404.php 
10.1.1.201 - - [03/Dec/2012:15:06:58 +1100] [testsite.com/sid#463bd0][rid#4500fc0/initial/redir#1] (3) [perdir C:/workspace/project/public/] applying pattern '(.*)' to uri '404.php' 

답변

1

당신은 당신의 signup 디렉토리 내부의 .htaccess이 같은 RewriteBase을 사용해야합니다

RewriteEngine On 
RewriteOptions inherit 
Options +FollowSymlinks 

RewriteBase /signup 

RewriteRule ^page1$ /signup/index.php?page=1 [NC,L,QSA] 
+0

이상하게도 이상하게도, 나는 이것을 시도했지만 그것이 작동하지 않는다고 맹세했습니다. 오 잘, 어쨌든 지금 일하고 있습니다. 감사! – Jason

0

이 시도 :

RewriteEngine On 
RewriteRule ^signup/page1/?$ http://mydomain.com/signup/index.php?page=1 [L] 
+0

이 변화는 어떤의 행동이나 로깅 출력을 변경하지 않습니다 방법. 루트 .htaccess와 하위 디렉토리에서 모두 시도했습니다. – Jason