Jump to content

ASP-PHP Page Bookmark


interealm

Recommended Posts

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

 

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.