Htaccess redirect to main site, discarding rest

I’ve moved a site over to a new system where we used to use a subdomain ( - but now will be using the main domain instead AND the link structure will be very different. (I.E. it used to be and now will be using a dynamic program…)

There are FAR too many pages for me to try to redirect each possibility, and we’re changing a lot of the way it was structured anyway, so really, that’s just not feasible. So, I basically want to redirect anyone who goes to any page under to go to the MAIN page at - without carrying over any of the rest of the URL…

using the following in the subdomain’s root htaccess:

Redirect /

produces a redirect, but it tries to keep the whole URL (ex. redirects to

How can I tell it to just go to ?

Many thanks in advance… htaccess is not my strong point. :stuck_out_tongue:

Are you removing the content from the subdomain? Because you can use

ErrorDocument 404

And then instead of getting a “Not found” the visitor will get a redirect.

Though you can also use

RedirectMatch .*

:cool: [color=#6600CC]Atropos[/color] |

The ErrorDocument statement didn’t work, but the RedirectMatch did!

Thanks so much… I looked all over the place for this. Just didn’t know how to ask the search engines the right question to get the answer. :slight_smile:

A much better approach would be to let the links result in a 404 but provide a helpful error page with an explanation, search form, and navigation and/or a sitemap. Everyone understands 404s, but being unexpectedly redirected somewhere else can be a little confusing. Better to handle the error gracefully than try to preempt it like this.

If you want useful replies, ask smart questions.