2014-10-01 3 views

답변

1
wp_redirect($location, $status); 
exit; 
+0

이 코드는 어디에 배치해야합니까? – Resolution

1
,321처럼

또는 시도 0 가장 쉬운 방법은 webroot directory.htaccess 파일을 만드는 것입니다.

이후 그것에이 쓰기

Redirect /wp-admin http://www.example.com/custom 

상당히 자기 설명한다. 두 번째 링크 http://www.example.com/custom

에 첫 번째 링크 /wp-admin에서 Redirect 또 다른 방법은 아마 워드 프레스를 wp_redirect() 기능 같은 것을 사용하는 것입니다 :

wp_redirect('http://example.com/custom', $status); 
+0

'wp_redirect ('http://example.com/custom', $ status); '를 어디에 두어야합니까? – Resolution

+0

@wes-login.php 안에 @Resolution – Xatenev

1

를 사용하여 다른 리디렉션하여 functions.php 파일에 다음 코드 URL.

function redirect_login_page(){ 

// Store for checking if this page equals wp-login.php 
$page_viewed = basename($_SERVER['REQUEST_URI']); 

// Where we want them to go 
$login_page = http://example.com/custom; //Write your site URL here. 
// Two things happen here, we make sure we are on the login page 
// and we also make sure that the request isn't coming from a form 
// this ensures that our scripts & users can still log in and out. 
if($page_viewed == "wp-login.php" && $_SERVER['REQUEST_METHOD'] == 'GET') { 

// And away they go... 
    wp_redirect($login_page); 
    exit(); 

} 
} 

add_action('init','redirect_login_page'); 
+0

이 코드는 어디에 두어야합니까? – Resolution

+0

답변 됨 편집 됨 .. –