• I just moved my wordpress site to the root of my server, and am using WP as a CMS for the redesigned site. I want to be able to redirect all my old pages from the previous site, but am unable to do that either via htaccess or with php (using header() function). I’ve added this line to the beginning of the index.php file:

    <?php $pg=$_GET[‘pg’];

    if ($pg !== “”) {
    header(“Location:https://mysite.org/$pg/&#8221;);
    }
    ?>

    this simply goes to my WP homepage, and not to the specific page that I want it to.

    Can anyone help me sort this out?

    Thanks

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Moved wordpress to site root and am unable to setup redirects for old pages’ is closed to new replies.