Forum Moderators: phranque

Message Too Old, No Replies

page has new location. Dealing with search engines and humans

         

esllou

11:34 am on May 30, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



my site used to have the structure:

domain.com/red
domain.com/green

and each of those directories had about 50 pages

now I would like to have

domain.com/red
domain.com/green
domain.com/blue

where "blue" will contain half the pages that were previously in "green".

For internal users off the site, there will be no problems. I am concerned about the search engines and people who use them who will have the old "green" pages bookmarked. What do I do about Google. How can I give a permanent URL change to google and other search engines? Should I leave duplicates of the pages in the old "green" directory for a while or will that just extend the time it takes google to delete them from the index?

And what is the best thing to do about real visitors who come from search engine listings...just let them see my custom 404 page?

j4mes

12:15 pm on May 30, 2004 (gmt 0)

10+ Year Member



A 301 redirect from your .htaccess file is probably the best way to go about it, something like

redirect 301 /red/page.html ht*p://www.domain.com/blue/new_page.html

replace ht*p with http - that's just to stop WebmasterWorld making it a link!

which will redirect people, search engines and bookmarks. If your site is crawled fairly regularly then Google will pick up the redirects pretty fast, but people clicking old links will be redirected anyway, so I shouldn't worry too much.

HTH

James.

j4mes

12:22 pm on May 30, 2004 (gmt 0)

10+ Year Member



Also, try Googling for "htaccess 301 redirect" ( [google.com...] ), there's absolutely loads on the subject - it's an old problem ;)

esllou

1:03 pm on May 30, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If I had a load of pages with url's like this:

domain.com/colour-green/greenproduct.html

and they are now

domain.com/colour-blue/blueproduct.html

how could I use rewrite in .htaccess to do 301 redirects to a whole load of them. Too many for me to list out individually in the .htaccess but there is enough of each URL in common for me to be able to do a mod_rewrite, I think

?

j4mes

1:21 pm on May 30, 2004 (gmt 0)

10+ Year Member



These may be a help:
[httpd.apache.org...]
[apacheref.com...]

RedirectMatch allows you to redirect by matching regular expressions, which I think is what your trying to do.

This is all Apache stuff, so you might find you get more help from [webmasterworld.com...]

Good luck :)

esllou

1:24 pm on May 30, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



ok, cheers. thanks for that.

j4mes

1:45 pm on May 30, 2004 (gmt 0)

10+ Year Member



No problem, hope it all works out for you :)