SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Wizard Jun Valasek's Avatar
    Join Date
    Dec 2007
    Posts
    1,292
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    How to redirect dead links in wordpress to homepage?

    I made a lot of modifications on one of my blogs and there are so many dead links. I can't remember how to redirect these dead links to my homepage. Can someone tell me please.. Thanks

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,598
    Mentioned
    24 Post(s)
    Tagged
    1 Thread(s)
    Add the following line to your .htaccess file:

    Code:
    ErrorDocument 404 http://www.example.com
    replace example.com with your real domain name (since example.com is specifically reserved for use as an example domain name for situations where you are supposed to substitute your domain name).
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #3
    SitePoint Wizard Jun Valasek's Avatar
    Join Date
    Dec 2007
    Posts
    1,292
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Hi Stephen, Wow, thanks a lot.. I remember before I was doing this with 404.php file but I forgot how to do it.. Anyway, its working now with your suggestion..

    Thanks,
    Jun

  4. #4
    SitePoint Member
    Join Date
    Jan 2011
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @felgall : Thank a lot :D


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •