...

htaccess

finsklapphundkl
10-12-2004, 10:39 AM
Hello

I use htaccess for passwordprotection and error-pages.
This is what Ive adden in the htaccess-file:
ErrorDocument 401 /Feilmeldinger/ForbeholdtmedlemmerFLK.htm

But I have a strange problem. When somebody wants to access access a passwordprotected page without a password the htaccess-file redirects them to:

Errorpage (http://www.finsklapphundklubb.org/Feilmeldinger/ForbeholdtmedlemmerFLK.htm)

If you visit this url directly a nice picture shows up. But when the htaccess-file sends a user to this page the picture dissappears...
So the htaccess-file "does" it job, but wheres the picture?

Just try this, and you will see what I mean:
Try this (http://www.finsklapphundklubb.org/Medlemssider/Kantarellsok/Ovelse06.htm)

Nightfire
10-12-2004, 11:12 AM
You#ve got the image in the members area. It's not going to show up as the image is protected. Stick the image into another directory outside your members area

finsklapphundkl
10-12-2004, 11:21 AM
No, it is not. And to be sure I just moved it to another place. Same problem... :(

bazz
10-13-2004, 01:30 PM
It seems to me that the two pages linked to above, are different. one is at a dfferent level than the other. Try adding ../ to the local url of one of the pages or use an absolute url.

my 2p

bazz

finsklapphundkl
10-13-2004, 03:36 PM
Here is my "structure":
My errorpages are placed at:
http://www.finsklapphundklubb.org/Feilmeldinger/(To pages here, see below)
while the "membersarea" (which is passwordprotected) is at:
http://www.finsklapphundklubb.org/Medlemssider/(Several directories under here)

So Ive placed a htaccess-file here:
http://www.finsklapphundklubb.org/Medlemssider/.htacess
and the htpasswd-file under:
http://www.finsklapphundklubb.org/.htpasswd

This is the lines in the htaccess-file:
ErrorDocument 401 /Feilmeldinger/ForbeholdtmedlemmerFLK.htm
ErrorDocument 403 /Feilmeldinger/Ikkelov.htm

And everything works just fine, except from the picture....Which I think is a good picture!

Nightfire
10-13-2004, 04:06 PM
On the error page put the FULL url to the image. You have the image pointing to the members area where the image isn't there.

<img src="http://yoursite.com/image/theimagetobeshown">

finsklapphundkl
10-13-2004, 05:36 PM
Thank you VERY much!!!!!!!!

I think this picture "illustrates" well how a visitor feels when he discovers that he has to be a member if he wants to watch!

Again,
Thank you!!!!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum