Forum Moderators: phranque

Message Too Old, No Replies

301 catch all?

         

AndrewPeterson

3:57 pm on Aug 27, 2004 (gmt 0)

10+ Year Member



Is there a 301 catch all?

Im using:

<VirtualHost *>
ServerName ***.widget.com
Redirect 301 / [***.widget2.com...]
</VirtualHost>

This only redirects if people type in the domain name.
I still have people visiting pages at that domain
ie
***.widget.com/blob.htm

but are given an error instead.

Is there a catch all to forward all pages?

jdMorgan

4:26 pm on Aug 27, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Redirect uses prefix matching, and so can be used (with proper syntax) to redirect all pages:

Redirect 301 / http://www.widget2.com[b]/[/b]

Any URL-path with a prefix of "/" will be redirected in this case, and anything following that prefix in the original URL will be appended to the substitution URL on the right.

It's actually more difficult to selectively redirect; that requires you to use RedirectMatch.

Jim