0

I have this rewrite rule

RedirectRule ^(/arf/sites/.*)$ /docs/saf/files$1 [R=301,I,L]

When it redirects, $1 contains /arf/sites/filename.html so after the redirect, the visitor ends up at

http://domain.com/docs/saf/files/arf/sites/help/filename.html

when I was expecting them to end up at

http://domain.com/docs/saf/files/filename.html

How do I get rid of the prepended directories in $1 - or am I doing this wrong?

Clarkey
  • 167
  • 1
  • 4

1 Answers1

1

Changing the rule to

RedirectRule ^/arf/sites/(.*)$ /docs/saf/files$1 [R=301,I,L]

should solve the problem.

Thomas Stinner
  • 257
  • 1
  • 4