Oct 142011
 

nginxToday i’ve spent a lot of time (probably too much) to understand how to modify extensions, inside an url, with the rewrite of Nginx.

Mi goal was call the url http://mysite.com/miofile.html and serve http://mysite.com/miofile with Nginx, which is actually a php script and not a real html..
To make things more difficult a url with a .html can also specify an existing file and real html file.

Finally i’ve got everything sorted out correctly, so with this post i hope to help someone else in the future to save some time.
Continue reading »

Flattr this!

Jun 162011
 

nginxOn my site I had a small problems with feeds, i’ve them managed with feedburner and I’ve 1 feed for every language, so you can choose to have the feeds in English or in Italian. The problem is that I’d like that when a user write http://linuxaria.com/feed it land on my feedburner page for English while writing http://linuxaria.com/feed?lang=it he should lands on the Italian feed page.

I’ve tried with the wordpress plugin for feedburner, but that it’s good only if you have 1 feed, because it blindly redirect everything to 1 feedburner address, so it’s not a good solution for my 2 bilingual feeds.

And so I’ve done it with a rewrite in Nginx.
Continue reading »

Flattr this!