Forum Moderators: phranque

Message Too Old, No Replies

RedirectMatch of multiple pages

Alternative to one page at a time

         

guillermo5000

9:41 pm on Aug 4, 2005 (gmt 0)

10+ Year Member



I am trying to redirect requests for specific pages of a site to the same pages at a different domain. I would normally use RedirectMatch statements like these...

RedirectMatch 301 /$ [domain2.com...]
RedirectMatch 301 /index.php$ [domain2.com...]
RedirectMatch 301 /partners.htm$ [domain2.com...]

But now I need to do this with a large site with hundreds of pages.

Is there a simpler way to do this, since the page names never change? Thanks all!

ChadSEO

9:45 pm on Aug 4, 2005 (gmt 0)

10+ Year Member



guillermo5000,

Try the following on for size:

RedirectMatch 301 /(.*)$ [domain2.com...]

That should redirect all traffic to the domain2.com site, with the same page name.

guillermo5000

5:44 am on Aug 5, 2005 (gmt 0)

10+ Year Member



Ah! I see how you matched whatever page it was.

Thank you very much!