2009-09-01 16 views
1

이전 퍼머 링크를 표준 ​​형식 (예 : http://example.com/?page_id=2)으로 사용했습니다. 이제는 wp 루트 폴더에있는 httpd.ini 파일에서 ISAPI 다시 쓰기를 사용하여 이것을 변경했습니다. 이 작동하지만, 이전 page_id = x 스타일 페이지를 http://example.com/subject 형태의 현재 퍼 뮤 링크로 리디렉션해야합니다.리디렉션 old permalinks (page_id = x) wordpress

나는 RedirectPermanent 키워드 등을 살펴 봤지만 아무것도 실제로 작동하지 않는 것 같습니다. 페이지 수가 매우 제한되어 있으므로 모든 page_ids를 지정하는 목록은 실제로 문제가되지 않습니다. 아무도 내가 어떻게 할 수 있는지 아니?

답변

1

발견. 아마 여기가 아닌 좋은 책에 트릭 만 간다 :

RewriteRule /(.*)?page_id=3(.*) /company_profile [L,I,RP] 

내 전체 httpd.ini 파일은 지금 :

[ISAPI_Rewrite] 
RewriteEngine On 

RewriteBase/
RewriteCond ${REQUEST_FILENAME} !-f 
RewriteCond ${REQUEST_FILENAME} !-d 
# For special Wordpress folders (e.g. theme, admin, etc.) 

RewriteRule /wp-(.*) /wp-$1 [L] 
RewriteRule /google(.*) /google$1 [L] 

#Rewrites for permanently moved pages (page_id=x): 
RewriteRule /(.*)?page_id=3(.*) /company_profile [L,I,RP] 

# For all Wordpress pages 
RewriteRule ^/$ /index.php [L]  
RewriteRule /(.*) /index.php/$1 [L] 

희망이 누군가를하는 데 도움이!

관련 문제