How to Redirect a Deleted Page to Another Page Using .htaccess file  

Eminent Member Admin

When you delete a page or a post or a category  you will break any links to that web address.

As there is no web page to display, the web server sends a page that simply says “404 Page not found”. 404 errors can have a negative effect on your website’s search ranking and can be frustrating for site users.

The solution to this is to redirect the page to another similar page. There a many ways to do this but the simplest solution is to use .htaccess file.

If you are comfortable editing files, you simply need to add one line of code to your .htaccess file to create a redirect.

Here is the code to add:

redirect 301 /old-page/ 

Somethings to note:

  • replace /old-page/ with your old page slug. Do not include your domain URL, only the page slug.
  • replace with the full path including http:// (www is optional) to your new page. Include a trailing slash (/) at the end of your URL
  • put each redirect on its own line. - No.1 Forum for blogger, webmasters and internet marketers in Nigeria.

Posted : 04/01/2017 8:28 am cody liked

Please Login or Register