Jump to content

include absolute path in password protected folder


chriso20

Recommended Posts

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

 

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!

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.