Welcome to WebmasterWorld Guest from 54.144.246.252

Forum Moderators: Ocean10000 & incrediBILL & phranque

Password protected directory not including SSIs

How do I include files above/parallel to the password protected dir?

   
5:10 pm on Oct 6, 2003 (gmt 0)

10+ Year Member



(On Apache, have mod_rewrite, using .htaccess...)

I'm trying to include, via SSI, the site-wide header & footer on a page that is in a password protected directory, only they are not being included (and are replaced with the SSI error message - you know, "bad directive," or whatever the default is.)

This is the general idea:

/root
/root/includes
/root/protected

/root/protected/index.shtml can't get at /root/includes/header.shtml using...

<!--#include virtual="/includes/header.shtml"-->

...although that works elsewhere on the site.

How do I get this to work without making a copy of the necessary files under /root/protected?

Shoot... You know what? The style sheets aren't loading either... :(

This is a development site I'm going on, so I wonder if this has any bearing: Access to /root itself is password protected while still in development and /root/protected uses a different login...

(Did I mention I want to put another protected directory under /root/protected? :)

6:37 am on Oct 8, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Any progress on this balam? Your post seems a little open ended to me.
This is a development site I'm going on, so I wonder if this has any bearing: Access to /root itself is password protected while still in development and /root/protected uses a different login...

Exactly which site do you want to fix was my initial reaction. :)

4:39 pm on Oct 8, 2003 (gmt 0)

10+ Year Member



Hey ya, Dave...

Any progress on this balam?

While I'm really hoping that the calvary rides in to save me on this, I have had some progress (and now have only a single problem.)

I've duplicated what I want (directory structure, etc.) on my live test domain for that "real world application" feel (or more exactly, just how it will be set up for the client.) No password is required to enter the site, just the (wanted) directories.

Let me rehash the directory & file structure...

/root/home.shtml
/root/style.css
/root/includes/header.shtml
/root/protected/index.shtml

So, off you surf to mydomain.com, where home.shtml comes up as expected and all CSS and SSI works. (In my first message neither worked, but I believe I was correct when I suspected that the differing logins between getting into the development site proper and the protected (development) directory were, um, "conflicting.")

Following the link to /protected/index.shtml brings up the login prompt, and after the correct name/pass, displays index.shtml. Now the trouble begins...

index.shtml (now) does include the SSI from the parallel, unprotected directory, but absolutely refuses to load style.css.

If I tell you what fixes don't work, will you tell me what will? ;)

- Moving (copying, actually) style.css to /root/protected (making the necessary HTML changes)
- Switching from "<style> @import..." to "<link rel="stylesheet"..." (and back)
- Using a bare filename to a fully-qualififed URL to point to the location of style.css
- Combinations of the above three "fixes"

I solved the SSI issue, but I've completely run out of ideas on how to get the CSS to load. There's too much in the style sheet to paste it into the HTML (and I don't want that additional maintenance.)

I dunno... I'd like to give up on this, but there's a dollar figure attached. I'm already bald, so next to go are the eyebrows & beard... ;)

5:29 pm on Oct 8, 2003 (gmt 0)

10+ Year Member



Make sure the "login" has permission to the files in question.

It may allow anonymous, but it also needs specific permissions for the "login".

 

Featured Threads

Hot Threads This Week

Hot Threads This Month