Results 1 to 4 of 4

Thread: Changed file type from ASP to PHP does not recognized

  1. #1
    Join Date
    Apr 2008
    Posts
    193

    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.

  2. #2
    Join Date
    Apr 2008
    Posts
    193

    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:

    AddType application/x-httpd-php .php

  3. #3
    Join Date
    Mar 2008
    Posts
    232

    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.

  4. #4
    Join Date
    Jan 2009
    Posts
    124

    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.

Similar Threads

  1. Replies: 1
    Last Post: 16-08-2010, 05:25 PM
  2. Replies: 1
    Last Post: 16-08-2010, 04:44 PM
  3. Can't delete 0 byte file, with no file type
    By Adele2 in forum Windows XP Support
    Replies: 8
    Last Post: 15-12-2009, 11:33 AM
  4. User account type changed to debugger (was Administrator)
    By Dilbert in forum Windows Security
    Replies: 3
    Last Post: 16-07-2008, 03:47 PM
  5. File Type / File Folder Options Problem
    By blackz in forum Windows XP Support
    Replies: 2
    Last Post: 30-06-2008, 03:24 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •