mod rewrite - Redirect subfolder to another keeping query string -


On Apache Web server, I would like to create a type URL folder to match each other, and at the end of the URL string Query string for matched folder

The URL may be typed:
http://www.website.net/corp/view/folder1/folder2

and Pages with result result will be internally:
http://www.website.net/corp/files/?dir=folder1/folder2

I Httpd.conf Tried the following rule in: RewriteRule ^ / corp / view /(.*) / corp / files /? Dir = $ 1 [L] , and I found an infinite loop, the URL itself has been redirected ...

Thank you for your help.

Use . of <+>

  revised rule ^ / corp / view /(.+) / corp / files /? Dir =   

instead of $ 1. * causes an infinite recycle because it matches the empty string at the end of / corp / files /

Comments