如何重定向?

what if i have 2000 links on my site, should i write mod rewrite rules for each of them i want only 1 rule If I use an internal rewrite rule to change my web page names instead of a redirect,it appears that I will have a duplication of content? For example, if I rewrite /oldpage.html to /working-person.html, it gets an internal redirect to working-person.html. This actually works. But oldpage.html is still a "direct" link, and does not show a 301.

The server throws a 500 error if I add [R] or [R=301] at the end:

RewriteRule ^oldpage.html$ working-person.html [R=301].

On the other hand...

Redirect 301 /oldpage.html http://www.example.com/working-person.html

...works. Should I just use a redirect?

I thought I read somewhere to use rewriterule instead of redirect when using other directives. Why use an internal rewrite if you get duplicate content?

Thanks for any ideas/opinions.

You want to use 301 (moved permanently) so search engines (like Google) can reindex your site. Once that has happened you don't need the redirect anymore.

You should never have duplicate content.

This line of yours has a syntax error:

RewriteRule ^oldpage.html$ working-person.html [R=301].

There a dot in the end causing 500 internal error.

Change that to:

Options +FollowSymLinks -MultiViews
# Turn mod_rewrite on
RewriteEngine On
RewriteBase /

RewriteRule ^oldpage\.html$ /working-person.html [R=301,L,NC]

If you have 2000 odd links then provide some sample of old and new links so that I can suggest whether that can be handled by few mod_rewrite rules or not.

Make sure mod_rewrite and .htaccess are enabled through httpd.conf and then above code is placed in your .htaccess under DOCUMENT_ROOT directory.