-3

I have a server pointing to DocumentRoot /var/www/mysite

I would like to redirect all requests from /var/www/mysite/folder/ to /var/www/mysite/

I tried the following:

 `RedirectMatch 301 /mysite/folder/(.*) http://example.com/folder/$1`

But it doesn't work.

After spending several hours on it, I can't find where is the problem.

Do you have any ideas?

Thanks

2

2 Answers 2

1

You need to remove /mysite from the redirect-match. The redirect-match is relative to the document root.

RedirectMatch 301 /folder/(.*) http://example.com/folder/$1
-1

Try this:

RedirectPermanent /folder/ http://example.com/

Not the answer you're looking for? Browse other questions tagged .