Welcome to WebmasterWorld Guest from 50.19.53.104

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

proper format for RedirectPermanent

several pages pointing to 1 page

     

LateNight

7:06 pm on Nov 14, 2005 (gmt 0)

10+ Year Member



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

or:

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]

jdMorgan

1:31 pm on Nov 15, 2005 (gmt 0)

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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-[12]\.html$ http://example.com/new-page.html

Jim

 

Featured Threads

Hot Threads This Week

Hot Threads This Month