You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Randy Paries <rt...@gmail.com> on 2006/10/06 05:44:09 UTC

[users@httpd] Looking for some ideas on how to stop someone view an html page directly using Server Side Includes

I need some ideas on how to solve this problem. I am thinking there has to
be a way...

I have a web server with thousands of users(each with their own
sub-directories)

In each of these sub directories is a file called main.html
(btw  these are the only htmls the rest of the site is jsp and perl, i do
not have to rename them to shtml)

What i am trying to figure out how to do is restrict them from doing
http://www.domain.com/user/main.html

the correct way is to do http://www.domain.com/user which calls index that
has frames and so on.

So i was thinking maybe i could use SSI. I have been reading the doc, but it
looks pretty limited

Can SSI look for a cookie or something and then if not present do something
else?

So i thought i would approach this group and see if anyone had any brilliant
ideas.

Thanks
Randy

Re: [users@httpd] Looking for some ideas on how to stop someone view an html page directly using Server Side Includes

Posted by Randy Paries <rt...@gmail.com>.
On 10/5/06, Chris Cheshire <ch...@gmail.com> wrote:
>
> What about putting main.html inside the WEB-INF folder hierarchy and
> having your index page do the SSI include of the main page. The web
> server should be set up to automatically deny all access to everything
> under WEB-INF but as an SSI type request this will not come into
> effect.
>
> I have done this in JSP successfully, I am assuming that the shtml SSI
> directives will work in a similar way.
>
> HTH
>
> Chris
>


Chris
Thanks for the suggestion.
the problem is that i have a directory structure of over 6000 main.htmls and
i would have to reproduce that structure under WEB-INF.
But that is an interesting idea.

Re: [users@httpd] Looking for some ideas on how to stop someone view an html page directly using Server Side Includes

Posted by Chris Cheshire <ch...@gmail.com>.
What about putting main.html inside the WEB-INF folder hierarchy and
having your index page do the SSI include of the main page. The web
server should be set up to automatically deny all access to everything
under WEB-INF but as an SSI type request this will not come into
effect.

I have done this in JSP successfully, I am assuming that the shtml SSI
directives will work in a similar way.

HTH

Chris

On 10/5/06, Randy Paries <rt...@gmail.com> wrote:
> I need some ideas on how to solve this problem. I am thinking there has to
> be a way...
>
> I have a web server with thousands of users(each with their own
> sub-directories)
>
> In each of these sub directories is a file called main.html
> (btw  these are the only htmls the rest of the site is jsp and perl, i do
> not have to rename them to shtml)
>
> What i am trying to figure out how to do is restrict them from doing
> http://www.domain.com/user/main.html
>
> the correct way is to do http://www.domain.com/user which calls index that
> has frames and so on.
>
> So i was thinking maybe i could use SSI. I have been reading the doc, but it
> looks pretty limited
>
> Can SSI look for a cookie or something and then if not present do something
> else?
>
> So i thought i would approach this group and see if anyone had any brilliant
> ideas.
>
> Thanks
> Randy
>
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org