Forum Moderators: phranque

Message Too Old, No Replies

rewrite with wildcard

redirect access to a deleted dir...

         

quarantine

1:16 pm on Jun 28, 2004 (gmt 0)

10+ Year Member



I can't seem to find the answer to this, I'm sure, common problem.

Checking my logs I have a number of visits to a dir/page that I have deleted.
In that dir I had a hundred or so html pages.
I want to redirect visitors to the root index.

I tried:
Redirect /popup/*.* [domain.com...]

but that didn't work.

I think I need to do this with a Rewrite but I'm not sure how to structure it.

gergoe

1:42 pm on Jun 28, 2004 (gmt 0)

10+ Year Member



Try

RedirectPermanent /popup/ http://www.domain.com/index.php

...so all requests for any resource in the popup directory will be redirected (by telling the browser that it is permanent, so some browsers might update the bookmarks) to the index.php

quarantine

1:55 pm on Jun 28, 2004 (gmt 0)

10+ Year Member



what happen there is if I go to:
[domain.com...]

it sends me to:
[domain.com...]

gergoe

2:00 pm on Jun 28, 2004 (gmt 0)

10+ Year Member



Well, then use RedirectMatch, so you'll have more control on what you want to have included in the redirected url. Something like this:

RedirectMatch permanent ^/popup/ http://www.domain.com/index.php

quarantine

2:20 pm on Jun 28, 2004 (gmt 0)

10+ Year Member



yep that did it.
thanks.