# Problem trying to rewrite a URL

**URL:** <https://www.ruby-forum.com/t/problem-trying-to-rewrite-a-url/238352>\
**Category:** NGINX\
**Created:** [January 6, 2014, 5:55am UTC](https://www.ruby-forum.com/t/problem-trying-to-rewrite-a-url/238352 "2014-01-06T05:55:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![musicdenotation](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Post date:** [January 6, 2014, 5:55am UTC](https://www.ruby-forum.com/t/problem-trying-to-rewrite-a-url/238352/1 "2014-01-06T05:55:40Z")

</div>

Hi all,

I have a problem trying to rewrite a URL.

It should be pretty straightforward but it has been taking me hours  
searching.

Google indexed urls containing “;”, which gets escaped to %3b:

> **[Hội du lịch Việt Nam - nơi chia sẻ kinh nghiệm du lịch](https://hoidulich.com/index.php?action=tagged%3bid=254715%3btag=vietholiday)**
>
> Hội du lịch Việt Nam - nơi chia sẻ kinh nghiệm du lịch

(the original url that works is  
[Hội du lịch Việt Nam - nơi chia sẻ kinh nghiệm du lịch](http://hoidulich.com/index.php?action=tagged;id=254715;tag=vietholiday))

How can I fix it?  
Thank you very much.  
Cao Tri.

Posted at Nginx Forum:

> **[Problem trying to rewrite a URL](https://forum.nginx.org/read.php?2,246052,246052#msg-246052)**
>
> Hi all, I have a problem trying to rewrite a URL. It should be pretty straightforward but it has been taking me hours searching. Google indexed urls containing ";", which gets escaped to %3b: http://hoidulich.com/index.

---

<div class="post-metadata">

**Author:** ![hoidulich](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/f07891/32.png) [@hoidulich](https://www.ruby-forum.com/u/hoidulich)\
**Post date:** [January 8, 2014, 9:12am UTC](https://www.ruby-forum.com/t/problem-trying-to-rewrite-a-url/238352/2 "2014-01-08T09:12:07Z")

</div>

AFAIK nginx has no directive for unescaping URLs. You could do it with  
Lua  
or go down a messy path of map directives listing all arguments with  
permutations.

Rather what you need to do is fix your application so that it accepts  
escaped URLs. They’re standard and there’s no reason why it shouldn’t  
IMO.  
Le 6 janv. 2014 05:55, “hoidulich” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) a crit :
