Andy Baird
Andy Baird

Reputation: 6228

301 Redirects for dead links

I'm migrating a client from a proprietary system to a wordpress CMS-type platform.

His old site has years of indexed pages on Google.

I'm already using pretty URL's in Wordpress, but I can't replicate the structure exactly and migrate over the pages maintaining the URL.

We'd like to issue a proper HTTP 301 header to the new residence of these pages so that Google follows the links and reindexes them properly.

Is there any systemic (e.g., some sort of Apache config change) that I could do instead of a wordpress solution? If not, what are all my options for doing this?

Upvotes: 0

Views: 161

Answers (2)

BobBrez
BobBrez

Reputation: 723

You can use .htaccess

Create a .htaccess file in the top directory.

Add the following line

ErrorDocument 301 /error-docs/301.html

This will let you redirect to better error pages.

Upvotes: 0

Jon Moore
Jon Moore

Reputation: 1420

Sure, you can use mod_alias from Apache to issue rewrites:

# Specific URLs
Redirect permanent /one http://example.com/two
# Regex-based URLs
RedirectMatch (.*)\.gif$ http://www.anotherserver.com$1.jpg 

Upvotes: 2

Related Questions