2010-04-09 2 views
0

깨끗한 URL을 얻는 규칙을 다시 작성했습니다. 유일한 문제는 Google이 일부 동적 URL을 표시하고 동적 URL을 제공하지 않겠다는 것입니다. 동적 URL에 사용자 유형, 그는 깨끗한 URL .. 예로 리디렉션됩니다 경우 :htaccess : 동적 URL 리디렉션 - 정적 URL 만 표시 - 더블 콘텐츠

내가 원하는 무엇

Options +FollowSymLinks 
RewriteEngine On 
RewriteBase/
RewriteCond $1 !apple\+banana 
RewriteRule ^(.*)\+apple\+banana/$ ?q=$1 [L] 

가 감사 :

http://www.example.com/?index=bananas 
    (if someone types that in, he gets redirect to the url above) 
    http://www.examplcom/bananas/ 

이 내 htaccess로입니다! !

답변

0

좋아, 다시 시도 :)

RewriteCond %{QUERY_STRING} ^index=([a-zA-Z0-9]+)$ 
RewriteRule ^/ /%1? [R=302,L] 
+0

아니, 나던 작업을 .. :( – elmaso

+0

@Elmaso : 업데이트 된 버전을 시도 :) – Wolph