I'm migrating my website from PHP to ASP.NET and I have a problem.
All links on my website are mapped by GOOGLE, for example: _http://www.xxxxx.com/news开发者_StackOverflow社区.php?id=4345.
When the new version of Website is online, this mapping will not exist. The link will change to _http://www.xxxxx.com/news.aspx?id=4345.
How can I solve this problem?
Thanks
You can just use the IIS rewrite module to redirect requests to .php to the .aspx equivalent.
Using mod_rewrite or use a 301 redirect to redirect from the .php files to the .aspx files.
An IIS rewrite is not the most appropriate manner to do this.
Using an IIS rewrite means that you will be adding this redirection overhead FOREVER. Whereas you can maintain the old site for a few months using the 'moved permanently' 301 redirect, which will force Google and others to update their links.
精彩评论