Redirecting ENTIRE directory to one html page

**NOTE : this problem is fixed :slight_smile:

Hi guys,

I’m trying to redirect an old site to a new domain, but the site structure has changed significantly.
I’m using the .htaccess file and the Redirect command.

If i write

redirect 301 /

it does redirect all the pages, but it tries to take them to their equivalent page in the new domain… for example, tries to redirect to

but I want ALL the old pages to go to the index page, as the new site doesn’t really have equivalents for the pages. I have tried adding index.html to the end of the redirect but it still doesn’t work.

Typing each one in manually would be an option if needed, except that the old site is REALLY old, using frames and a sidebar, and the redirect doesn’t seem to like that, they’re just not working at all.

any ideas?

  • stuart


OK, i’ve kindof got it half working. I have used this code

RedirectMatch 301 ^/.*$

which I don’t fully understand, but is working for some pages.
However some other pages just don’t redirect. I can’t work out why… 2 pages that look almost identical HTML wise are behaving differently, with only one redirecting and the other loading as usual?!