2013-08-30 4 views
0
좀 URL 규칙을 재 정의 할 수 htaccess로 파일 워드 프레스 3.5을 편집 할

는 예 :워드 프레스 : htaccess로 리디렉션 URL

Redirect http://localhost/my_site/blog/cat/hello-world to http://localhost/my_site/cat/hello-world 

내가

Redirect 301 /localhost/my_site/blog/cat/hello-world/ http://localhost/my_site/hello-world/ 

또한

<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteBase /my_site/ 

Redirect 301 http://localhost/my_site/blog/cat/hello-world/ http://localhost/my_site/cat/hello-world/ 

RewriteRule ^index\.php$ - [L] 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule . /my_site/index.php [L] 
</IfModule> 
시도

이지만 브라우저에 표시되는 내용은

입니다.

페이지는,

이 다소 당황을하지 않는 찾을 수 없음?

.. 어떻게하면됩니까?

답변

1

Redirect을 mod_rewrite와 함께 사용하지 않으려면 mod_rewrite를 사용하십시오. Redirect을 다음으로 대체하십시오.

RewriteRule ^my_site/blog/cat/hello-world/ /my_site/cat/hello-world/ [L,R=301]