.htaccess conflict with Wordpress

Discussion in 'Setting-up protection' started by sknollii, Jan 7, 2009.

  1. sknollii

    sknollii New Member

    Joined:
    Nov 8, 2006
    Messages:
    10
    I've done my looking on this forum and can't find an answer on this exact problem.

    I have a wordpress install (in a directory one level up from the root) already set up.

    I have installed aMember in the amember folder which is located at the root level as directed.

    When trying to protect the blog folder I get the following error:

    File exists and contains non-aMember code unmodifiable by aMember. If you don't need this file, delete it and aMember will automatically create a new aMember compatible .htaccess file to replace it.

    all the htaccess contains is:

    I also have the wordpress integrattion in place.

    I am stumped on this and have no idea how to proceed. I assume I may have to manually edit the htaccess file but have no idea what need to go on it.

    Anyone have any insight (read as: fix) for this?

    Many thanks,

    Sam Knoll
  2. jungledsales

    jungledsales New Member

    Joined:
    Jan 8, 2009
    Messages:
    3
    Same issue

    I've worked on this same issue all afternoon even after reading several forum posts.

    I have WP 2.7 installed 2x on my server.

    http://domain.com/blog (public - no protection by amember)
    http://domain.com/members (should be protected by amember)

    Every time I turn on amember protection for the /members/ folder, I get an error message (Redirect Loop). And when I delete the .htaccess file my site comes back but it's no longer protected.

    Is this a WP 2.7 issue? Or do I need to change my .htaccess file in some way? Suggestions?
  3. davidm1

    davidm1 aMember User & Partner

    Joined:
    May 16, 2006
    Messages:
    4,437
    Can you post a screenshot of what you see?

    David
  4. CrackBaby

    CrackBaby Member

    Joined:
    Aug 22, 2006
    Messages:
    154
    can you RENAME the htacces file and then let amember create one.

    After it is created download it and edit it in a txt editor

    add

    # BEGIN WordPress

    # END WordPress

    to the bottom of the file if that does not work add it to the top

    What are the results?
  5. jungledsales

    jungledsales New Member

    Joined:
    Jan 8, 2009
    Messages:
    3
    The url is really long too:

    Code:
    http://kriscounselor.com/members/amember/plugins/protect/new_rewrite/login.php?v=-any&url=/members/amember/plugins/protect/new_rewrite/login.php%3fv=-any&url=/members/amember/plugins/protect/new_rewrite/login.php%253fv=-any&url=/members/amember/plugins/protect/new_rewrite/login.php%25253fv=-any&url=/members/amember/plugins/protect/new_rewrite/login.php%2525253fv=-any&url=/members/amember/plugins/protect/new_rewrite/login.php%252525253fv=-any&url=/members/amember/plugins/protect/new_rewrite/login.php%25252525253fv=-any&url=/members/amember/plugins/protect/new_rewrite/login.php%2525252525253fv=-any&url=/members/amember/plugins/protect/new_rewrite/login.php%252525252525253fv=-any&url=/members/amember/plugins/protect/new_rewrite/login.php%25252525252525253fv=-any&url=/members/amember/plugins/protect/new_rewrite/login.php%2525252525252525253fv=-any&url=/members/amember/plugins/protect/new_rewrite/login.php%252525252525252525253fv=-any&url=/members/amember/plugins/protect/new_rewrite/login.php%25252525252525252525253fv=-any&url=/members/amember/plugins/protect/new_rewrite/login.php%2525252525252525252525253fv=-any&url=/members/amember/plugins/protect/new_rewrite/login.php%252525252525252525252525253fv=-any&url=/members/amember/plugins/protect/new_rewrite/login.php%25252525252525252525252525253fv=-any&url=/members/amember/plugins/protect/new_rewrite/login.php%2525252525252525252525252525253fv=-any&url=/members/amember/plugins/protect/new_rewrite/login.php%252525252525252525252525252525253fv=-any&url=/members/amember/plugins/protect/new_rewrite/login.php%25252525252525252525252525252525253fv=-any&url=/members/amember/plugins/protect/new_rewrite/login.php%2525252525252525252525252525252525253fv=-any&url=/members/amember/
    I tried the # BEGIN WordPress # suggestion but still get the same problem.

    If I rename or delete the htaccess file it starts working again... just not protected.
  6. jungledsales

    jungledsales New Member

    Joined:
    Jan 8, 2009
    Messages:
    3
    Attached the error message that shows up after I try protecting the /members/ folder
  7. salem

    salem aMember Pro Customer

    Joined:
    Jan 14, 2009
    Messages:
    15
    Did this get resolved? I just installed WP-mu 6.5 and the integration module and I get the same error:File exists and contains non-aMember code unmodifiable by aMember. If you don't need this file, delete it and aMember will automatically create a new aMember compatible .htaccess file to replace it.

    Note: Before I got the above error I received the below errors when selecting the folder which I wanted to protect.

    Contents of directory /var/www/vhosts/mysite.com/httpdocs/ WARNING: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/var/www/vhosts/mysite.com/httpdocs/..) is not within the allowed path(s): (/var/www/vhosts/mysite.com/httpdocs:/tmp) in line 310 of file protect.php
    WARNING: is_dir() [function.is-dir]: open_basedir restriction in effect. File(/var/www/vhosts/mysite.com/httpdocs/..) is not within the allowed path(s): (/var/www/vhosts/mysite.com/httpdocs:/tmp) in line 322 of file protect.php
  8. codeispoetry

    codeispoetry aMember Pro Customer

    Joined:
    Jan 12, 2009
    Messages:
    336
    You can't protect a folder using aMember if there's a .htaccess already there. For wordpress, usually that happens because you're using Pretty Permalinks.

    You need to delete .htaccess file (revert back to default links) or rename it (create a backup copy).

    If it still can't work, you might want to try Walled Garden with Pretty Permalinks
  9. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    I've done this for a number of sites.

    Rename the existing .htaccess, create the new one via aMember and integrate the two.

    No extra plugins and configuration required.

    If you have troubles, post the two .htaccess files here and one of us can assist in combining for you.
  10. Lynette

    Lynette aMember Pro Customer

    Joined:
    Jun 26, 2004
    Messages:
    11
    I've done this many times too and like skippybosco, I rename existing .htaccess, protect with amember, open old htaccess, copy code from that paste it into new htaccess that amember creates. Also, make sure to paste the WP htaccess code before amember code.
  11. kimboy

    kimboy New Member

    Joined:
    May 2, 2011
    Messages:
    20
    can you RENAME the htacces file and then let amember create one.

    After it is created download it and edit it in a txt editor

    add

    # BEGIN WordPress

    # END WordPress

    to the bottom of the file if that does not work add it to the top

    What are the results?
  12. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    @kimboy: while it is awesome that you're helping out, just wanted to point out that thread was from 2009 :)

Share This Page