301 a single page instead of the whole directory?

2 replies
Hi, I am trying to set 301 htaccess redirections to redirect a single page to a new one, but every page inside the directory is being also redirected.

This is what I am using:

Code:
RedirectMatch 301 ^/old-page /new-page
This is happening:

This is what I want:

This is because a lot of pages inside "old-page" directory doesn't exist anymore and I don't want every old page being redirected to the new parent directory to avoid an SEO issue.
#301 #directory #page #single
  • Profile picture of the author RobinInTexas
    Try this:

    Code:
    RedirectMatch 301 ^/old-page$ /new-page
    Signature

    Robin



    ...Even if you're on the right track, you'll get run over if you just set there.
    {{ DiscussionBoard.errors[9033446].message }}
    • Profile picture of the author maninthemiddle
      Originally Posted by RobinInTexas View Post

      Try this:

      Code:
      RedirectMatch 301 ^/old-page$ /new-page
      Awesome, that's what I needed. Thank you very much.
      {{ DiscussionBoard.errors[9033474].message }}

Trending Topics