Google App Engine网址重写

I'm having problems to redirect custom image URLs to actual static image file.

My images custom URLs look like:

/420-home_default/custom-url.jpg

And must be redirected to:

my_site_root_dir/img/p/4/2/0/420-home_default.jpg

I tried using the following configuration in the app.yaml:

- url: `/([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$`

  static_files: `my_site_root_dir/img/p/\1/\2/\3`

  upload: `my_site_root_dir/img/p/\1/\2/\3/\1\2\3\4\5\.jpg`

and this one as well:

- url: `/([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?/.+\.jpg$`

  static_files: `my_site_root_dir/img/p/\1/\2/\3`

  upload: `my_site_root_dir/img/p/\1/\2/\3/([0-9])([0-9])([0-9])(\-[_a-zA-Z0-9-]*)?(-[0-9]+)?\.jpg`

But none of them works, getting always a 403 forbidden response (chmod -R 777 has been applied to the site root dir, just to make sure privileges are not a problem)

Any ideas?

Sorted.

my_site_root_dir is not needed in the upload section.