Publish and Delete Files?

I think you are combining the Redirect idea with the idea of a custom 404 page. Setting up a redirect will make those old links to the old URL’s go to the new URL of the new page that replace the old one.

You do this in your .htaccess file on your web server:

Put something like this in your .htacess file:

Redirect 301 /oldpage.html http://www.yoursite.com/newpage.html
Redirect 301 /client-store/gifts/keychains/ http://www.yoursite.com/new-page-for-keychaims/
or
Redirect 301 /client-store/gifts/keychains/ /new-page-for-keychains/

I think it will work with both the relative URL and the Full URL. I have done it with the regular URL on my site.

So the old URL comes first, then a space, and then the new URL. You will make an entry for each page you redirect.

The idea is that the search engines will replace the old URL with the new URL, so the corresponding new page is found instead of the old URL becoming a 404 error.

I haven’t tried Paul’s 404 method but this from Gary at Doobox works and is good if you want a custom 404 page:

Then add this to your htaccess file :

ErrorDocument 404 /404.html

and as Steve mentioned in the next post on that page:

Body {
display: none;
}

and
javascript window.location = “https://yoursite/friendly404.page

2 Likes