2014-12-18 3 views
1

동적 인 친숙한 URL이 필요합니다.MODX 맞춤 .htaccess 다시 쓰기 규칙 또는 동적 URL

/portfolio/tags/communication은 통신 매개 변수로 통신해야합니다. 나는 다음과 같이 URL을 다시 써 보려고했다 :

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule portfolio/tags/(.*)$ portfolio/tags?filter=$1 [N] 
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] 

그러나 지금까지 성공하지 못했다. modx에서 동적 URL을 가질 수있는 다른 방법이 있습니까?

답변

1

지시어의 순서가 잘못되어있는 것처럼 보입니다. 다시 쓰기 조건은 바로 다음 규칙에만 적용되며 index.php 라우팅 규칙에 조건을 적용해야합니다. 따라서 시도하십시오 :

RewriteRule portfolio/tags/(.*)$ portfolio/tags?filter=$1 [L,N] 

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA] 
+0

예. 예. :) thx 많은 친구. – thgie