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

 

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.