PHP URL Redirects

Topics: Developer Forum, User Forum
Oct 17, 2007 at 7:53 PM
Edited Oct 17, 2007 at 8:00 PM
I have a web site that is currently written in PHP and has quite a few links in the search engines. I have a need to move the site to .Net and was hoping to use your URLWriter to 301 redirect those PHP links to the appropriate pages on my new ASP.NET site.

In IIS, I have mapped the .php files to the ASP.NET ISAPI DLL. I think the next step is to add an entry to the System.Web/HttpHandlers section of the web.config but I am having problems mapping that to your assembly.

Do you have any guidance on how to accomplish this?

Oct 24, 2007 at 10:49 AM
Hi bbehm,

Should work fine by mapping *.php to the ASP.NET DLL.

However, by default the UrlRewriter is only configured to deal with ".htm,.aspx" files by default. You can add ".php" to this list in the UrlRewriter config section in your web.config. The attribute name is "applicableFileExtensions". e.g.

<urlRewriter applicableFileExtensions=".htm,.aspx,.php">

Let me know how you get on.