interealm Posted August 28, 2007 Share Posted August 28, 2007 Hi there, I am a new to PHP and I need to convert an entire ASP site to PHP. That is fine but there is a particular ASP page that has been bookmarked by many people. I was wondering if it is possible to create a PHP file that redirects the users to the correct link but have the file saved with an ASP extension instead of PHP. More information: I have http://www.intelligencerealm.com/countries/local/system.asp in IIS on a Win/IIS server and now I want to move the page to http://www.intelligencerealm.com/aisystem/system.php on a site that runs entirely on linux/apache/php and have the old machine discarded. Is this possible? Any help would be appreciated. Thanks, Ovidiu Quote Link to comment Share on other sites More sharing options...
trq Posted August 28, 2007 Share Posted August 28, 2007 You can quite easily direct request to .asp files to .php by putting something like the following in your .htaccess file. RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([a-z0-9]+).asp$ $1.php [L] Quote Link to comment Share on other sites More sharing options...
interealm Posted August 28, 2007 Author Share Posted August 28, 2007 Thanks a lot. Regards, Ovidiu Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.