| Welcome to WebmasterWorld Guest from 220.127.116.11 |
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
|Become a Pro Member|
|proper format for RedirectPermanent|
several pages pointing to 1 page
What is the correct format to point several pages on the same domain to one page in the .htaccess file. Can it all be done on one RedirectPermanent line or will it take several. Is this correct :
RedirectPermanent /old page-1.html /old page-2.html http://example.com/new-page.html
RedirectPermanent /old page-1.html http://example.com/new-page.html
RedirectPermanent /old page-2.html http://example.com/new-page.html
[edited by: jdMorgan at 1:32 pm (utc) on Nov. 15, 2005]
[edit reason] Example.com [/edit]
You'll need to list them out, as in your second example.
However, if these old pages' URL-paths have a lot in common, then look into using RedirectMatch, with which you can use regular expressions pattern-matching to match more than one URL-path.
For a simple example:
RedirectMatch 301 ^/old-page-\.html$ http://example.com/new-page.html
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved