WordPress.org

Ready to get started?Download WordPress

Forums

How to 301 redirection for directory? (3 posts)

  1. tripz0r
    Member
    Posted 2 years ago #

    Hello, i have WP site on classipress theme, and 95% of my post are made in ads section. And URL look like mysite.com/ads/post-name/ now i am moving on other theme, some magazine theme and there is no more ads. But because of SEO i want to make 301 redirection from that url witl /ads/ to new URL:
    mysite.com/ads/post-name/ i want to 301 to mysite.com/post-name/ so how to do that?
    Is there any plugin for that 301 redirect for whole dir or i will need to do it manual for all posts? I have about 1000+ post with that /ads/

    many thanks!

  2. Jonathan Dingman
    Member
    Posted 2 years ago #

    You'd want to do something like this.

    RewriteRule ^/ads/(.*)$ http://newlocation.com [R=301,L]

    Something along those lines should work.

  3. tripz0r
    Member
    Posted 2 years ago #

    You think it will work?

    I am thinking that can work if i am doing redirection from mysite.com/ads/post-name/ to mysite.com/subpage/post-name/

    but in my case i am actually removing /ads/

Topic Closed

This topic has been closed to new replies.

About this Topic