I’m a .net developer and I’ve just started developing a site on PHP running on IIS7-fastcgi.
I was wondering if there is any way to write a global function to automatically redirect any request that comes to my site in the format
http://something.com/anypage.php
to
http://www.something.com/anypage.php
You can do this in ASP.NET on the global.asax file. IS there any way to do this or set this condition in php?
I don’t think so..but you can do this using .htaccess
(edited to include comment below):
or the iis7 equivalent I guess is what you want http://learn.iis.net/page.aspx/557/translate-htaccess-content-to-iis-webconfig/