Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Changed file type from ASP to PHP does not recognized

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 02-02-2009
Member
 
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.

Reply With Quote
  #2  
Old 02-02-2009
Member
 
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:

Quote:
AddType application/x-httpd-php .php
Reply With Quote
  #3  
Old 02-02-2009
Member
 
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.
Reply With Quote
  #4  
Old 02-02-2009
Member
 
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Changed file type from ASP to PHP does not recognized"
Thread Thread Starter Forum Replies Last Post
Content Type | Mime Type for Office 2010 file format and extension ramsun Tips & Tweaks 1 16-08-2010 06:25 PM
Content Type | Mime Type for Office 2007 file format and extension D_chapple Tips & Tweaks 1 16-08-2010 05:44 PM
Can't delete 0 byte file, with no file type Adele2 Windows XP Support 8 15-12-2009 12:33 PM
User account type changed to debugger (was Administrator) Dilbert Windows Security 3 16-07-2008 04:47 PM
File Type / File Folder Options Problem blackz Windows XP Support 2 30-06-2008 04:24 PM


All times are GMT +5.5. The time now is 09:53 PM.