How do you do nginx rewrite rule to convert
example.com/?subtopic=forum&action=show_board&id=1
into this
example.com/forum/board/1
or this
example.com/?subtopic=characters&name=Eternal
into this
example.com/characters/Eternal
I've found and tried to play around with this code
location / {
rewrite ^/subtopic/(.*)$ /?subtopic=$1 last;
}
but it doesnt work (i'm really a newbie into rewriting)
rewrite ^(.*)$ /?subtopic=characters&name=$1 last;and its a step, it recognize something in a link, but when i try to see character page, it says Character /Eternal does not exist. - Rafal Olszewski