2012-11-02 2 views
1

나는 다음 링크를 가지고 있습니다 : domain.com/activate/ 그게 작동합니다, 활성화 페이지에 양식이 있습니다. 그리고 만약 내가 그걸 실행하면 : domain.com/activate/?code=heresomecodethingURL htaccess를 다시 작성

하지만 그 doesnt 작품. 내 원래 URL은 다음과 같습니다. domain.com/index.php?p=activate & 코드 = heresomecodething 나는 다음과 같이 작동합니다. domain.com/activate/code=heresomecodething 어떻게하면됩니까 ??

내 htaccess로 :

RewriteEngine On 
RewriteRule ^(.*)/$ index.php?p=$1 [L] 

나는 나 스탠드에서 당신을 바랍니다.

감사합니다. - Marijn

답변

0

시도 :

RewriteEngine On 
RewriteRule ^([^/]+)/(.*)$ /index.php?p=$1&$2 [L,NE] 

([^/]+)activate 일치하고 (.*)code=heresomecodething 일치 있도록, /activate/code=heresomecodething 같은 외모를 제출하고자하는 URI, 모두 $1$2를 통해 backreferenced됩니다

/index.php?p=$1&$2 

:

/index.php?p=activate&code=heresomecodething 

이 규칙 는 쿼리 문자열로 URI에 (무대 뒤에서/브라우저가 완전히 uneffected입니다) 재 작성 내부적으로 /activate/code=heresomecodething 같은 외모와 URI 걸립니다.