chriso20 Posted November 23, 2007 Share Posted November 23, 2007 Hey, I have a development area on my site (eg. http://dev.mysite.com) and i all my content pages include header and footer php files. At the moment they're using relative URLs, but due to my file structure i want to use absolute. But if i change my code from <?PHP include ("../header.php"); ?> to <?PHP include ("http://dev.mysite.com/header.php"); ?> i get a 401 (Authorization Required) error. I was thinking i could change something in my .htaccess to allow SSI? Thanks for any help, Chris Quote Link to comment Share on other sites More sharing options...
trq Posted November 23, 2007 Share Posted November 23, 2007 http:// is a url, not a file path. Quote Link to comment Share on other sites More sharing options...
chriso20 Posted November 23, 2007 Author Share Posted November 23, 2007 very true, so i should change it to ? \home\public_html\ something like that? Quote Link to comment Share on other sites More sharing options...
revraz Posted November 23, 2007 Share Posted November 23, 2007 Yes Quote Link to comment Share on other sites More sharing options...
chriso20 Posted November 23, 2007 Author Share Posted November 23, 2007 Sorry for being stupid - should have realised it had to be file system. Can someone point me in the right direction (or give me a hint) for setting up a global var (if i mean that) so i can link to /siteA/header.php /siteB/header.php instead of what i'm doing now which is: /home/public_html/site/dev/header.php Cheers for your help! Quote Link to comment Share on other sites More sharing options...
Aureole Posted November 23, 2007 Share Posted November 23, 2007 Just use a constant... define('SITE_PATH', 'something...'); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.