On Sat, Jun 20, 2009 at 10:04 PM, Edho P Arief <span dir="ltr"><<a href="mailto:edhoprima@gmail.com">edhoprima@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Sun, Jun 21, 2009 at 4:17 AM, Kevin<br>
<div><div></div><div class="h5">Castiglione<<a href="mailto:kevincastiglione@gmail.com">kevincastiglione@gmail.com</a>> wrote:<br>
> On Sat, Jun 20, 2009 at 2:15 PM, Kevin Castiglione<br>
> <<a href="mailto:kevincastiglione@gmail.com">kevincastiglione@gmail.com</a>> wrote:<br>
>><br>
>> On Fri, Jun 19, 2009 at 11:17 PM, Edho P Arief <<a href="mailto:edhoprima@gmail.com">edhoprima@gmail.com</a>><br>
>> wrote:<br>
>>><br>
>>> On Sat, Jun 20, 2009 at 12:44 PM, Kevin<br>
>>> Castiglione<<a href="mailto:kevincastiglione@gmail.com">kevincastiglione@gmail.com</a>> wrote:<br>
>>> > hi<br>
>>> > if any one goes to<br>
>>> > <a href="http://XXX.aaa.com/bbb" target="_blank">XXX.aaa.com/bbb</a><br>
>>> ><br>
>>> > i want to do a permanent redirect to<br>
>>> > <a href="http://aaa.com/bbb" target="_blank">aaa.com/bbb</a><br>
>>> ><br>
>>> ><br>
>>> > any suggestions on how to do this?<br>
>>> > thank you<br>
>>> ><br>
>>><br>
>>> server {<br>
>>> listen 80;<br>
>>> server_name *.<a href="http://aaa.com" target="_blank">aaa.com</a>;<br>
>>> rewrite ^.* <a href="http://aaa.com" target="_blank">http://aaa.com</a>$uri;<br>
>>> }<br>
>><br>
>> edho:<br>
>> thanks for this. im going to be handling multiple domains, so is it<br>
>> possible to do this rewrite without hardcoding?<br>
>><br>
>> rewrite ^.* <a href="http://aaa.com" target="_blank">http://aaa.com</a>$uri;<br>
>><br>
>> for ex somthing like<br>
>> rewrite ^.* http://$maindomain$uri;<br>
><br>
> also this rewrite rule gives Redirect Loop error on all browsers.<br>
> thank you<br>
><br>
<br>
</div></div>I forgot to escape the dot.<br>
<br>
did you mean:<br>
NNN.somedomain.tld => somedomain.tld<br>
for any somedomain.tld?</blockquote><div>this is exactly what i want<br>NNN.somedomain.tld => somedomain.tld<br> <br></div></div><br>