Changed file type from ASP to PHP does not recognized
Earlier my site was PHP based later i changed to ASP.NET Everything works great. I also created a PageNotFound page that appears when an invalid page was entered.
However, if someone navigates to the site with a PHP file which now shifted to ASP then an error is displayed and my PageNotFound page is NOT displayed.
I understand this is related to the fact that ASP.NET is not managing PHP files. Is there a simple way to change it so it does? This is on a shared hosting service so I can't change the OS settings. Ideally, there would be something I could add to my web.config file.
Thanks.
Re: Changed file type from ASP to PHP does not recognized
PHP can parse any valid script, whether it is called foo.php, very_long_name.php.php.php, or even wom.bat. Using the default extension of ".php" means that before your hackers start you have already told them you are using PHP. As mentioned, you can use any filename for your scripts - if you are using PHP for every script on your server, consider using the ".html" extension for your scripts and making PHP parse HTML files.
If you are running Apache, you can change your file extension by changing this line:
Quote:
AddType application/x-httpd-php .php
Re: Changed file type from ASP to PHP does not recognized
A better guess would be that IE is still looking for index.html since you've defiantly viewed your site before on your PC and IE has kept a cached version of it. So try clearing out the cache (temporary internet files) and the history and see if it helps.
Re: Changed file type from ASP to PHP does not recognized
I think this is because you do not specified index.asp as one of the default file. Make sure your server/hosting set index.asp in the default file list (normally contains index.html, index.htm, default.html...).
If any more queries please feel to ask,hope this helps you.