“Good ideas are a dime a dozen, but implementation is priceless!”

Posts tagged ‘uniserver’

php customised handler

#Problem:
We have .php file but we want to call it by .aspx extension in request url.

#Platform:
Uniform Server [3.5-Apollo]
Apache/2.0.59 (Win32) DAV/2 PHP/5.2.3

Solution:
In W:/usr/local/apache2/usr/local/apache2/conf/httpd.conf In Line: 294

===============================================
AddType application/x-httpd-php .phtml .php3 .php

add [.aspx] after it ->

AddType application/x-httpd-php .phtml .php3 .php .aspx
================================================
Then, change the desired .php file’s extension to .aspx without changing the php code.

And don’t forget to restart your uniserver.

tada! thats it!
Now you can simply use your php code like asp. 🙂