Forum Moderators: phranque

Message Too Old, No Replies

Run php code in an .aspx or .htm extension file

moving an aspx

         

centime

2:32 pm on Jun 2, 2007 (gmt 0)

10+ Year Member



Hi All
Tried this on an earlier post , but the code doesn't work, most like cos i don't know any php , apache, or htaccess etc

I am guess tis a simpe thing, but what is the exact code, placed somewhere in .htaccess tp cause

index.aspx to be parsed as if it where index.php

i would like to place php

301 code in

index.aspx

g1smd

6:27 pm on Jun 2, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



See the AddType declaration.

centime

7:11 pm on Jun 2, 2007 (gmt 0)

10+ Year Member



Hi G1smd

none of the following below worked, i've commented them all out of .htaccess, from checking on the internet, it appears to be something to do with my hosts linux/apache/php implementation,
the host is the really cheap, really big, with funny tv ads host, allez pere :)

I found a thread that offered a solution, but I can't figure the syntax, whats xyz

[webmasterworld.com...]

Code I have tried is below

Code to enable redirection from aspx files to php
#AddHandler application/x-httpd-php .aspx

#AddType text/aspx .php
#AddHandler php-script .php .aspx

#RemoveHandler .aspx
#AddType application/x-httpd-php .php .aspx

#RemoveHandler .html .htm
#AddType application/x-httpd-php .php .htm .html

#AddType text/aspx .php

#AddType application/x-httpd-php .php .html .htm .asp .aspx

#redirectpermanent /default.aspx [mydomainname.com...]

#redirectpermanent /default.htm [mydomainname.com...]

#redirectpermanent /default.php [mydomainname.com...]

#AddHandler server-parsed .php .aspx

# /web/cgi-admin//phpinfo4.php4
# script from internet
# ScriptAlias /cgi-bin/ "/web/cgi-admin/"

# General
#AddHandler cgi-script .php
#AddType text/html .php

# hosts code
# AddHandler x-httpd-php5 .php
# AddHandler x-httpd-php .php4
# AddType application/x-shockwave-flash swf

# AddHandler x-httpd-php .aspx
# AddType application/x-httpd-php .php .html .htm .asp .aspx

# AddType application/x-httpd-php .php .aspx