SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    Jun 2014
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP 301 redirect with message???

    I have a problem my website is a forum I removed about 300 threads and now Google is returning lots of 404 errors so I need a way to redirect all that traffic to homepage. I need 301 redirect but with a message?

    <snip />
    Last edited by cpradio; Jun 5, 2014 at 04:04. Reason: unnecessary url

  2. #2
    SitePoint Guru
    Join Date
    Jan 2007
    Posts
    967
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Instead of a 301 Redirects, why don't you make a 404 error page that has a message, search bar, and or site map that will help visitors find what they are looking for. If you really must use a 301 Redirect, you could add a query string to the link. IE: http://myhomepage?message=1

    Then display the message if(message==1). This could be done on the front end with JavaScript or back-end with PHP or whatever you are using.


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
  •