Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

windows php directory type alias

Status
Not open for further replies.

bahrahmah

Programmer
Jul 28, 2000
2
US
I'm running apache 1.3.12 on windows nt with php 3.0.16 and am trying to get all references to documents in a specified directory (and its subdirectories) to be passed to a single php script.<br><br>Basically, I want urls like this:<br><br><A HREF=" TARGET="_new"> HREF=" TARGET="_new"> map to htdocs/lib.php.<br><br>I've tried various combinations of httpd.conf directives, but nothing works.<br><br>&lt;Location /lib/&gt;<br>ForceType application/x-httpd-php3<br>&lt;/Location&gt;<br><br>Comes close, but only calls the lib.php script for <br>&nbsp;&nbsp;&nbsp;&nbsp;<A HREF=" TARGET="_new"> I try<br>&nbsp;&nbsp;&nbsp;&nbsp;<A HREF=" TARGET="_new"> invokes php with something like this:<br>&nbsp;&nbsp;&nbsp;&nbsp;php d:\apache\htdocs\lib.php\a.html<br><br>Which of course fails, because that file does not exist.<br><br>The above works on the Solaris and Linux version of apache, however.&nbsp;&nbsp;The one difference is that PHP is an apache module on the Linux systems.<br><br>Does any one know how to get the above to work on windows?<br><br>Thanks for any help...<br>
 
try change the &lt;Location&gt; to &lt;Files&gt; like this:<br><br>&lt;Files lib&gt;<br>ForceType application/x-httpd-php3<br>&lt;/Files&gt;<br><br>the website <A HREF=" TARGET="_new"> has an article about the thing that you wanted to do. <p> <br><a href=mailto: > </a><br><a href= > </a><br>ttest<br>
:) happy programming :)
 
Changing Location to Files has no effect.&nbsp;&nbsp;I tried in both the httpd.conf and .htaccess files.<br><br>By the way, I originally found the &quot;ForceType&quot; from an article on <A HREF=" TARGET="_new"> this doesn't seem to work on windows.&nbsp;&nbsp;<br><br>The problem may be that for this to work, you need to run apache php-mod, which doesn't exist for windows.&nbsp;&nbsp;As I stated above, the problem is that apache is invoking php like this:<br><br>&nbsp;&nbsp;php d:\apache\htdocs\lib.php3\abc.html<br><br>Whereas for this to work, it would need to invoke<br><br>php d:\apache\htdocs\lib.php3 <br><br>and pass in the &quot;abc.html&quot; as a parameter.<br><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top