Invoking PHP scripts from a redirect location

From: Date: Fri, 17 Aug 2001 14:22:15 +0000
Subject: Invoking PHP scripts from a redirect location
Groups: php.general 
Request: Send a blank email to php-general+get-63190@lists.php.net to get a copy of this message
Hi, I am having trouble getting a redirected file's php section activating. Some info to help you understand: 1) Within Apache's httpd.conf file I have the following set: DocumentRoot "D:/Program Files/Apache Group/Apache/realdocs" <Directory "D:/Program Files/Apache Group/Apache/realdocs"> RedirectMatch permanent ^/$ "P:/Main Projects/Test/index.php" ScriptAlias /php/ "d:/php/" AddType application/x-httpd-php .php .phtml Action application/x-httpd-php "/php/php.exe 2)Within IE I enter: http://localhost which calls my index.php file: ------------------------ <html> <head> <title>PHP Test</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> <script> document.write("And the line is..."); </script> <?php print "please let me be seen"; ?> </body> </html> ------------------------ This only prints out the javascript section though and doesn't appear to call the php section. If I copy this file to my DocumentRoot directory and then call it via: http://localhost/index.php all is well and both the javascript and php sections are displayed. Do I need to somehow configure Apache to run php scripts from other locations or am I doing something stupid? Hope you can help, Neil -------------------------------- Email: neil.freeman@asa.co.uk neil_freeman@yahoo.com --------------------------------

« previous php.general (#63190) next »