I need some help to understand the Nginx rewrite function.
Imagine, a real file is at the following address:
http://www.domain.com/library/content/folder/country/page/index.html
I want to rewrite the URL, to have something better (more human readable!):
1. How can I do that with Nginx?
location = /... {
rewrite ...
}
Or
if ($request ~* "page") {
rewrite ...
}
2. How can I write this rule ?
If I was using Apache, I will write something like this:
RewriteRule ^page /(.*) library/contents/folder/contry/page/$1 [L]