Grow your CSS skills. Land your dream job.

certain page redirect

  • # March 5, 2012 at 12:12 pm

    Hey everyone! I was hoping someone could give me a hand with how to do this. We just launched a new site that was a revision of an old site. One standing issue I have is that one of the pages that shows up on a Google search leads to something like “services.php”. Since WP is rewriting the URLs, that particular page with the php extension is hitting the 404 error.

    We’ve placed some stuff in the 404 page to make it look a little more inviting to get anyone who encounters the page back into the main areas of the website, but I’m wondering – is there a quick and dirty way to just redirect that one page to the right WP page until Google indexes the new page? Or do you think that would do more harm than good SEO-wise?

    Thanks!

    # March 5, 2012 at 2:47 pm

    The best way to do this is using a 301 Redirect in your .htaccess file – however, I’m unsure if this file is often over-written by wordpress. Is there potentially a plugin that might allow you to edit htaccess and save it permanently?

    Alternatively – you could create a PHP page at the inbound URL and then redirect using;

    < ?php

    header( 'Location: http://www.yoursite.com/new_page.html' ) ;

    ?>
    # March 5, 2012 at 3:54 pm

    Thanks for the info – really appreciate it! My thinking is that using the permalinks you do override it but maybe you can set an exception and redirect one page? I’ll have to toy around with it and see.

    # March 5, 2012 at 6:02 pm

    Hey @andy_unleash,
    There’s a bug in IE9 for 301 redirects, meaning they’re permanent
    http://answers.microsoft.com/en-us/ie/forum/ie9-windows_7/possible-bug-in-ie-with-http-code-301-permanent/33cd03f0-8c82-e011-9b4b-68b599b31bf5?msgId=82db67c1-3f71-48f7-acdb-93214dce46fd

    I avoid them unless absolutely necessary

    # March 6, 2012 at 5:46 am

    I wasn’t aware of that problem with IE though he does note he’s using IIS, so a Windows server. Hopefully @JoshWhite is using Linux, as it is awesomer.

    @JoshWhite – let us know how you get on and give the PHP redirect a try if htaccess can’t be sorted.

    # March 6, 2012 at 4:24 pm

    You know, that actually worked just great, thanks andy! The only thing I’m worried about, and I can’t seem to get a solid bit of information on is if that will hurt any of the SEO until Google does it’s thing. So I’m just crossing my fingers :)

    # March 7, 2012 at 7:17 am

    If Google is yet to re-index the site then it won’t realistically have any impact on the SEO side of things. Ultimately it’s similar to calling content from a database, so if a search engine spider/bot goes on the page it will load like it does in your browser.

    I’d recommend getting ridding of it as soon as the search engines do update though just to save you any headaches moving forward.

    # March 7, 2012 at 12:33 pm

    yeah I’m checking it daily. I’ve already resubmitted a new sitemap but still nothing has been done. Once the Google search is updated I’ll pop it out.

    Thanks again for the quick tip.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".