Title: Attachment Pages Redirect
Author: Samuel Aguilera
Published: <strong>2012년 5월 16일</strong>
Last modified: 2026년 1월 16일

---

플러그인 검색

![](https://s.w.org/plugins/geopattern-icon/attachment-pages-redirect.svg)

# Attachment Pages Redirect

 작성자: [Samuel Aguilera](https://profiles.wordpress.org/samuelaguilera/)

[다운로드](https://downloads.wordpress.org/plugin/attachment-pages-redirect.1.1.2.zip)

 * [세부사항](https://ko.wordpress.org/plugins/attachment-pages-redirect/#description)
 * [평가](https://ko.wordpress.org/plugins/attachment-pages-redirect/#reviews)
 *  [설치](https://ko.wordpress.org/plugins/attachment-pages-redirect/#installation)
 * [개발](https://ko.wordpress.org/plugins/attachment-pages-redirect/#developers)

 [지원](https://wordpress.org/support/plugin/attachment-pages-redirect/)

## 설명

There are three possible scenarios where this plugin does something. In all cases,
the attachment page must exists, **the plugin will not run for deleted attachments**:

A) A visitor lands on an attachment page and the parent post is available (not in
trash or deleted). A 301 redirect will be issued to redirect the visitor to the 
parent post.

B) A visitor lands on an attachment page and the parent post was already deleted
from trash. A 302 redirect is issued to home page (this can be changed to 301 if
you want, see FAQ for more details).

C) A visitor lands on an attachment page and the parent post is in trash, therefore
not available for the visitor. It returns a 404 error code to prevent endless redirection
loop in old WP releases and redirecting to trashed/not available posts.

**There is no options page**, simply activate it and will do the job.

If you’re happy with the plugin [please don’t forget to give it a good rating](https://wordpress.org/support/plugin/attachment-pages-redirect/reviews/?filter=5),
it will motivate me to keep sharing and improving this plugin (and others).

#### Requirements

 * WordPress 4.8 or higher.

## 설치

 * Extract the zip file and just drop the contents in the `wp-content/plugins/` 
   directory of your WordPress installation (or install it directly from your dashboard)
   and then activate the Plugin from Plugins page.

## FAQ

### WordPress is returning a 404 error for my attachment pages, will this plugin help?

No. This plugin needs an existing attachment to work, if you deleted the attachment
WordPress will return a 404 for its attachment page and this plugin doesn’t support
that scenario.

### Can I change the HTTP codes used for the redirections?

Since version 1.1 you can do this by adding constants to your wp-config.php file.
The example below will switch the redirection codes used by default.

    ```
    define( 'ATTACHMENT_REDIRECT_CODE', '302' );
    define( 'ORPHAN_ATTACHMENT_REDIRECT_CODE', '301' );
    ```

**Use this at your own risk, only if you know what you’re doing!! No support will
be offered for this.**

## 후기

![](https://secure.gravatar.com/avatar/59dac8282668bbcd1ff54d8462c35f24a624eeb398ec2eb3e7725f944a407d4a?
s=60&d=retro&r=g)

### 󠀁[Great!](https://wordpress.org/support/topic/great-16350/)󠁿

 [sailboats25](https://profiles.wordpress.org/sailboats25/) 2024년 6월 20일

This plugin has been such a big help for my website. Before, people clicking an 
image they found in Google Images would be taken to the image's attachment page 
with no other context. Now they are taken to the page we want them to go to, leading
to better engagement with our site.

![](https://secure.gravatar.com/avatar/a08c238554a6afbd5044e701cd90d6de4750750abf1a42f111dd2d2e1e101c9b?
s=60&d=retro&r=g)

### 󠀁[Perfect](https://wordpress.org/support/topic/perfect-9865/)󠁿

 [robegb](https://profiles.wordpress.org/robegb/) 2023년 4월 22일

Exactly what I needed. Thanks!

![](https://secure.gravatar.com/avatar/24f7ca8f621ae28f8361cc995e081d65f3567baf36b487b58f13d4c47f80dec1?
s=60&d=retro&r=g)

### 󠀁[Works immediately](https://wordpress.org/support/topic/works-immediately-4/)󠁿

 [Joey](https://profiles.wordpress.org/joey4j/) 2023년 1월 11일

I didn't want any attachment pages to be accessed by visitors, then found this plugin
that does the job by just installing and activating. Thanks!

![](https://secure.gravatar.com/avatar/9c7be41168a828b3275c2a320c1b629708f7a7af499541029a40e662b9320a3e?
s=60&d=retro&r=g)

### 󠀁[Sorry this is not working anymore](https://wordpress.org/support/topic/sorry-this-is-not-working-anymore/)󠁿

 [metaeditor](https://profiles.wordpress.org/metaeditor/) 2022년 12월 3일 답글 1
개

Plugin is not working anymore

![](https://secure.gravatar.com/avatar/3d4f71e1ec85f9f6d59feec04823ee6f72608a54c424ed9acfcba3afc52758bf?
s=60&d=retro&r=g)

### 󠀁[The Best only.](https://wordpress.org/support/topic/the-best-only/)󠁿

 [dikasparaandroid](https://profiles.wordpress.org/dikasparaandroid/) 2022년 3월
13일

thanks man. You save a bigger work here. Thanks for this.

![](https://secure.gravatar.com/avatar/b6f803ff5449679ebd1392f688a9bfd0f46eff9e9631b58adac63939fa3afea1?
s=60&d=retro&r=g)

### 󠀁[It just works](https://wordpress.org/support/topic/it-just-works-693/)󠁿

 [jplew](https://profiles.wordpress.org/jplew/) 2021년 9월 20일

Works perfectly with no config needed. Doesn't get better than this folks.

 [ 모든 47 평가 읽기 ](https://wordpress.org/support/plugin/attachment-pages-redirect/reviews/)

## 기여자 & 개발자

“Attachment Pages Redirect”(은)는 오픈 소스 소프트웨어입니다. 다음의 사람들이 이
플러그인에 기여하였습니다.

기여자

 *   [ Samuel Aguilera ](https://profiles.wordpress.org/samuelaguilera/)

“Attachment Pages Redirect”(이)가 3 개 언어로 번역되었습니다. 기여해 주셔서 [번역자](https://translate.wordpress.org/projects/wp-plugins/attachment-pages-redirect/contributors)
님께 감사드립니다.

[자국어로 “Attachment Pages Redirect”(을)를 번역하세요.](https://translate.wordpress.org/projects/wp-plugins/attachment-pages-redirect)

### 개발에 관심이 있으십니까?

[코드 탐색하기](https://plugins.trac.wordpress.org/browser/attachment-pages-redirect/)
는, [SVN 저장소](https://plugins.svn.wordpress.org/attachment-pages-redirect/)를
확인하시거나, [개발 기록](https://plugins.trac.wordpress.org/log/attachment-pages-redirect/)
을 [RSS](https://plugins.trac.wordpress.org/log/attachment-pages-redirect/?limit=100&mode=stop_on_copy&format=rss)
로 구독하세요.

## 변경이력

#### 1.1.2

 * Changed code for 404 scenario to use the theme’s 404 template if it’s available.

#### 1.1.1

 * Minor changes to make code 100% compliant with WordPress Coding Standards. This
   doesn’t means any change in the plugin functionality, it’s just code cosmetic.

#### 1.1

 * Minor coding standards improvements.
 * Added ATTACHMENT_REDIRECT_CODE and ORPHAN_ATTACHMENT_REDIRECT_CODE constants 
   to allow change the HTTP redirection codes (e.g. change 302 to 301 for orphan
   attachments)
 * Prevent endless redirection loop in old WP releases and redirecting to trashed/
   not available posts if an attachment page is visited when parent post is in trash.
   Returning a 404 error in this case.

#### 1.0

 * Initial release.

## 기초

 *  버전 **1.1.2**
 *  최근 업데이트: **9개월 전**
 *  활성화된 설치 **10,000+**
 *  워드프레스 버전 ** 4.8 또는 그 이상 **
 *  다음까지 시험됨: **6.9.10**
 *  PHP 버전 ** 5.6 또는 그 이상 **
 *  언어
 * [English (US)](https://wordpress.org/plugins/attachment-pages-redirect/), [German](https://de.wordpress.org/plugins/attachment-pages-redirect/),
   [Spanish (Chile)](https://cl.wordpress.org/plugins/attachment-pages-redirect/),
   그리고 [Spanish (Spain)](https://es.wordpress.org/plugins/attachment-pages-redirect/).
 *  [자국어로 번역하기](https://translate.wordpress.org/projects/wp-plugins/attachment-pages-redirect)
 * 태그:
 * [301](https://ko.wordpress.org/plugins/tags/301/)[302](https://ko.wordpress.org/plugins/tags/302/)
   [attachment](https://ko.wordpress.org/plugins/tags/attachment/)[images](https://ko.wordpress.org/plugins/tags/images/)
   [redirect](https://ko.wordpress.org/plugins/tags/redirect/)
 *  [고급 보기](https://ko.wordpress.org/plugins/attachment-pages-redirect/advanced/)

## 평점

 별 5점 만점에 4.9점.

 *  [  45/5-별점 후기     ](https://wordpress.org/support/plugin/attachment-pages-redirect/reviews/?filter=5)
 *  [  1/4-별점 후기     ](https://wordpress.org/support/plugin/attachment-pages-redirect/reviews/?filter=4)
 *  [  0/3-별점 후기     ](https://wordpress.org/support/plugin/attachment-pages-redirect/reviews/?filter=3)
 *  [  0/2-별점 후기     ](https://wordpress.org/support/plugin/attachment-pages-redirect/reviews/?filter=2)
 *  [  1/1-별점 후기     ](https://wordpress.org/support/plugin/attachment-pages-redirect/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/attachment-pages-redirect/reviews/#new-post)

[모든  리뷰 보기](https://wordpress.org/support/plugin/attachment-pages-redirect/reviews/)

## 기여자

 *   [ Samuel Aguilera ](https://profiles.wordpress.org/samuelaguilera/)

## 지원

할 말 있으신가요? 도움이 필요하신가요?

 [지원 포럼 보기](https://wordpress.org/support/plugin/attachment-pages-redirect/)