Igor,<br><br>Thanks for the recommendations,<br><br>I've now come up with this final config:<br><br><a href="http://pastie.caboo.se/34269">http://pastie.caboo.se/34269</a><br><br><br><div><span class="gmail_quote">On 1/19/07,
<b class="gmail_sendername">Igor Sysoev</b> <<a href="mailto:is@rambler-co.ru">is@rambler-co.ru</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Fri, 19 Jan 2007, Saimon Moore wrote:<br><br>> Found the solution. Stupidity on my part. :)<br>><br>> Thanks anyway...<br>><br>> if ($server_name !~ "^(www\.)?mydomain\.com") {<br>> rewrite ^/(.*)$
<a href="http://www.mydomain.org/$1">http://www.mydomain.org/$1</a> permanent;<br>> }<br><br>Look the recommendations about *.mydomain.com separation:<br><br><a href="http://comments.gmane.org/gmane.comp.web.nginx.english/548">
http://comments.gmane.org/gmane.comp.web.nginx.english/548</a><br><a href="http://comments.gmane.org/gmane.comp.web.nginx.english/551">http://comments.gmane.org/gmane.comp.web.nginx.english/551</a><br><br>> On 1/19/07, Saimon Moore <
<a href="mailto:saimonmoore@gmail.com">saimonmoore@gmail.com</a>> wrote:<br>>><br>>> Hi,<br>>><br>>> I have a nginx config with 4 virtual hosts.<br>>><br>>> Specifically I have the following server_name declarations in my virtual
<br>>> hosts:<br>>><br>>> #VH1<br>>> server_name <a href="http://es.mydomain.com">es.mydomain.com</a>;<br>>><br>>> #VH2<br>>> <a href="http://en.mydomain.com">en.mydomain.com</a>;
<br>>><br>>> #VH3<br>>> <a href="http://fr.mydomain.com">fr.mydomain.com</a>;<br>>><br>>> #VH4<br>>> <a href="http://mydomain.com">mydomain.com</a> *.mydomain.com;<br>>><br>>> What I'd like to do is rewrite any request for VH4 (
i.e. not<br>>> es/en/fr.mydomain.com) to :<br>>><br>>> <a href="http://www.mydomain.com">www.mydomain.com</a><br>>><br>>> So if a request comes in for <a href="http://wwww.mydomain.com">wwww.mydomain.com
</a> I'd like to rewrite it to<br>>> <a href="http://www.mydomain.com/$request_filename">www.mydomain.com/$request_filename</a><br>>><br>>> I've tried a few things but haven't managed to get it right.
<br>>><br>>> My latest try:<br>>><br>>> #In VH4 server declaration<br>>> location /<br>>> {<br>>> if ($host !~ "/^(www\.)?amicsmuseuprecolombi\.org/") {<br>>> rewrite (.*)
<a href="http://www.amicsmuseuprecolombi.org$1">http://www.amicsmuseuprecolombi.org$1</a> permanent;<br>>> }<br>>> }<br>>><br>>><br>>><br>>> Thanks,<br>>><br>>> Saimon<br>
>><br>><br>><br>><br>> --<br>> Saimon Moore<br>> Freelance Web Developer<br>> (Available for hire - For details visit <a href="http://saimonmoore.net">http://saimonmoore.net</a>)<br>><br>> Skype: saimonmoore
<br>> Yahoo IM: saimonmoore<br>> Google IM: saimonmoore<br>><br><br>Igor Sysoev<br><a href="http://sysoev.ru/en/">http://sysoev.ru/en/</a><br><br></blockquote></div><br><br clear="all"><br>-- <br>Saimon Moore<br>
Freelance Web Developer<br>(Available for hire - For details visit <a href="http://saimonmoore.net">http://saimonmoore.net</a>)<br><br>Skype: saimonmoore<br>Yahoo IM: saimonmoore<br>Google IM: saimonmoore