homepage Welcome to WebmasterWorld Guest from 54.205.254.108
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

    
Password protected directory not including SSIs
How do I include files above/parallel to the password protected dir?
balam




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

(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? :)

 

DaveAtIFG




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

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. :)

balam




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

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... ;)

JuniorHarris




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

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

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved