Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7

Thread: htaccess

  1. #1
    New to the CF scene
    Join Date
    Oct 2004
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    htaccess

    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

    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

  • #2
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,265
    Thanks
    6
    Thanked 48 Times in 48 Posts
    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

  • #3
    New to the CF scene
    Join Date
    Oct 2004
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    No, it is not. And to be sure I just moved it to another place. Same problem...

  • #4
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts
    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
    "The day you stop learning is the day you become obsolete"! - my late Dad.

    Why do some people say "I don't know for sure"? If they don't know for sure then, they don't know!
    Useful MySQL resource
    Useful MySQL link

  • #5
    New to the CF scene
    Join Date
    Oct 2004
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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!
    Last edited by finsklapphundkl; 10-13-2004 at 04:38 PM.

  • #6
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,265
    Thanks
    6
    Thanked 48 Times in 48 Posts
    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">

  • #7
    New to the CF scene
    Join Date
    Oct 2004
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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!!!!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •