The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Redirect image URL to permalink (2 posts)

  1. dean_l
    Posted 4 years ago #

    Hi All

    please help with this - can i add redirect in .thaccess file that will allow me to redirect any URL inside post that contain ".jpg" or "thumb.jpg" to a permalink - same post where that image is placed?
    Of course it should be "RedirectMatch 301"

    Full description of the issue:
    Inside my posts (lot of them) I have image that is showing up in post, but also alone as a page, well i want to send that page to parent post. So posts "website.com/post1/" will have image that can be access through browser as "website.com/post1/example1-thumb.jpg" Now I don't want google to crawl this image and rather would like to redirect "website.com/post1/example1-thumb.jpg" with 301 to "website.com/post1/". There is too many posts so I need redirect as ti could not be done manually.

    Thanks a lot.

  2. dean_l
    Posted 4 years ago #

    Please note I don't want to redirect ALL images to prmalinks, just those with certain string such as "thumb.jpg". Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic