0

I'm trying to do a redirect in Nginx with Perl module configured.

I need to do some changes for one URL:

http://example-domain.org/es/Madrid/511/Delicias --> http://example-domain.org/es/restaurants-madrid/delicias

  1. I need change an uppercase URL to lowercase URL
  2. Change URL structure like the example

Somebody can help me to do this type of rewrite rule in nginx?

JasonMArcher
  • 14,195
  • 22
  • 56
  • 52
djacedj
  • 11
  • 1
  • You want to redirect from furst to second? How many such urls do you have? – Alexey Ten May 10 '15 at 05:41
  • From first to second, that's it! I have hundreds of urls like that... That's the problem. I need do lowercase and change url structure at the same time like in example... – djacedj May 10 '15 at 22:26
  • Are the uppercase urls handled by perl? If so then you could convert to lower case and send a redirect in perl. – Cole Tierney May 12 '15 at 01:13
  • Yes, I transform to lowercase by a function in perl locate in nginx.conf but I need to transform the URL like the example too... I cannot do two rewrites (one to lowercas and two for transform the Url) because server goes to a infinite redirecting loop... I need some way to do both actions. I know how to do in htaccess of Apache but not in virtualhost with nginx... – djacedj May 12 '15 at 10:38

0 Answers0