Nginx Rewrite Apache?

António P. P. Almeida appa at perusio.net
Tue Apr 12 01:50:23 MSD 2011


On 11 Abr 2011 22h19 WEST, nginx-forum at nginx.us wrote:

> Hi
> I have problem with rewrite from apache
> RewriteEngine On 
>
> RewriteRule
> ^[A-Z]{3}[a-z]{2}[0-9]{4}[a-z]{3}[0-9]{4}[A-Z]{2}[a-z]{1}[0-9]{1}/(.+)$
> files/$1


Here's how to shorten your regex:

rewrite "^[A-Z]{3}[a-z]{2}\d{4}[a-z]{3}\d{4}[A-Z]{2}[a-z]\d/(.+)$" files/$1; 

--- appa



More information about the nginx mailing list