Change M.mysite.com to WWW.mysite.com in a URL
<p>I use a javascript function on mobile page to redirect users to main page(pc). So i want to change the url! Change M.MYSITE.COM/somepath/page.HTML to WWW.MYSITE.COM/somepath/page.HTML</p>

<p>Mobie URL</p>

<pre><code> m.mysite.com/pics/en/?wallpaper/super-man_w39.html
</code></pre>

<p>To main URL </p>

<pre><code> www.mysite.com/pics/en/?wallpaper/super-man_w39.html
</code></pre>

<p>Is there any way using PHP? I tried using parse url but i failed! help me? any way?</p>
