Support » Fixing WordPress » Require help with 301 redirect

  • A while back, I moved my blog from a folder ( on my domain to the root ( To redirect visitors, I entered the following code in the 404.php file of my theme:

    header("HTTP/1.1 301 Moved Permanently");

    The problems I am facing are:
    I have t5wo issues regarding this:

    1. This redirect code comes into play if the requested link is not found, and the visitor is directed to the home page. I actually want that the reader be redirected only if the requested URL has* pattern. Else my custom 404 page should display.

    2. As the redirect is in the theme file, every time I change my theme, I have to paste this code in the new 404.php file. I know I can put the code in .htaccess but don’t know how to?

    Much appreciate.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Require help with 301 redirect’ is closed to new replies.