• Should have edited the posts but instead deleted them. Now you just get a white blank page when viewing those posts.

    Which file should I modify so that if there is no post selected from the SQL query the reader can be notified where to go or redirected?

Viewing 4 replies - 1 through 4 (of 4 total)
  • You deleted a post and you’re getting a white screen? You should be getting your 404 page. To modify the output, though, place a string in your .htaccess file that redirects from the requested URI to the new one:

    Redirect 301 /old/ https://example.com/new/

    Thread Starter mistergin

    (@mistergin)

    Ah, should have mentioned, because it’s IIS and I’m using permalinks, there is a 404 handler that includes index.cfm.

    This is one of the problems with blogs and IIS I’ve found, especially if you want nice looking links.

    So as a result, I’ll need to hack the actual file that gets the post so that if there are no results, I can display a message or perform a different action.

    Problem is searching for that specific sql query has proven fruitless (too many results, not enough knowledge of where to look). ??

    Sorry, just assumed a LAMP setup. Not familiar at all with IIS :o\

    Thread Starter mistergin

    (@mistergin)

    Well the server isn’t too terribly important as WP runs the same either way. If I knew which file gets the post though, I could modify it. Anyone know which file that would be? Or more specifically which query that would be?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘When a reader is linked to a deleted post – which file do I modify to redirect?’ is closed to new replies.