views:

679

answers:

1

I changed my website platform and i am now getting hits from google pointing to the old location of tag searches on my site. Basically i need to point:

http://www.website.com/articles/Subject%3Alist=Music-Oldies&review_state=published

to:

http://www.website.com/tags/Music-Oldies

..in my Nginx website file. Only the tag 'Music-oldies' needs to be extracted. 'Subject%3Alist' is actually 'subject:list'.

EDIT: '....articles/subject%3Alist...' should have been '....'articles?subject%3Alist....'

+1  A: 

You need a rewrite directive like this:

rewrite Subject:list=([^&]+) /tags/$1 permanent;
windyjonas
This doesn't seem to be working although i feel its close. I even tried:rewrite [\?..to catch it on any part of the querystring but still no luck
ironic_username
Hard to tell exactly what's going on. Could it be the capitalisation of the word "Subject"? Maybe: rewrite [sS]ubject:list=([^ works for you?
windyjonas
after testing this exhaustively in a regex tool,it all works well with the actual ':' btw 'subject' and 'list'. The only conclusion i can make is that nginx is not decoding '%3A' back to ':' before testing
ironic_username