| Welcome to WebmasterWorld Guest from 18.104.22.168 |
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
|Accredited PayPal World Seller|
|proper format for RedirectPermanent|
several pages pointing to 1 page
| 7:06 pm on Nov 14, 2005 (gmt 0)|
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]
| 1:31 pm on Nov 15, 2005 (gmt 0)|
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.
© Webmaster World 1996-2014 all rights reserved