Forum Moderators: phranque

Message Too Old, No Replies

Redirect from deleted dir?

Deleting section of site, want to redirect somewhere else

         

Warboss Alex

3:53 pm on Apr 25, 2005 (gmt 0)

10+ Year Member



Hey everyone,

I've got a shared Apache/PHP/MySQL account and a website, of which I'd like to completely remove one section.

This section is in its own folder, would the easiest way to do this be deleting the folder, and making the ErrorDoc for 404 in the containing folder of the (now deleted) folder redirect to the page, or a portal page which redirected with PHP or meta-tag?

Use words of one syllable, I'm good with PHP but not Apache, lol.

Thanks!

Span

6:39 pm on Apr 25, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Warboss, if you delete the contents of that folder any request for a file that was in there should be served a 410 Gone, not a 404.

Redirect 410 /folder/

.. in your .htaccess will do that.

jd01

6:45 pm on Apr 25, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi,

What is easiest or best usually depends on what you want and need.

Are you just removing pages, or have you created new pages to replace them? The answer to this is to Redirect all pages to all similar new pages.

Do you have inbound links to the part of your site you are removing that you need to keep credit for in a search engines? The answer to this (if no to answer 1) is to redirect everything to the home page or something similar

Do you want people to find a 404 page or do you want to take them to an actual page of your site? The answer to this is obviously to redirect them some where.

The actual writing of the rules changes, at least slightly with the answer(s) to these questions, so I won't attempt to explain that now.

BTW You can do the redirection from your main 'www' folder, so if you want to remove the sub-folder you can.

Hope this helps.

Justin