| 
 Posted by Colin Fine on 10/10/06 19:08 
mark Bannister wrote: 
> Newbie here. 
> Site is on shared server Apache, PHP 4.x 
> I am using modrewrite currently for some other things but I was  
> wondering about includes in php files.  They don't seem to pass through  
> .htaccess and modrewrite.   Is that correct?  I have 3 days experience  
> with .htaccess and modrewrite so I could well be doing something wrong. 
>  
> What I was trying to do is use a "fake" directory in all my includes  
> that modrewrite would rewrite to the correct directory. 
>  
> Thanks, 
> Mark B. 
 
I'm not an expert of this area, but as far as I know PHP's 'include'  
doesn't go outside PHP to the webserver at all, so it will not invoke  
any server features. 
The exception is if you use a full URL in the include, but that gives  
other problems - if you want to include a PHP file in that way you have  
to arrange that the server will serve PHP source (which it doesn't  
usually do). 
 
See http://uk.php.net/manual/en/function.include.php 
 
Colin
 
[Back to original message] 
 |