SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Hybrid View

  1. #1
    SitePoint Addict jessebhunt's Avatar
    Join Date
    Dec 2003
    Location
    Insomnia
    Posts
    278
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    small htaccess problem

    Hey everyone:

    I currently have an .htaccess file in the main directory for one of my sites. The .htaccess file is messing up one of my subdirectories. How can I make it where the .htaccess file will work on the main directory and most of the subdirectories, but not affect that particular subdirectory?

    In other words, I want the .htaccess file to affect www.mydomain.com AND www.mydomain.com/most_subdirectories/ BUT NOT www.mydomain.com/other_subdirectory/

    I'm sure there must be a few simple lines of code that I could put in an .htaccess file at www.mydomain.com/other_subdirectory/ that would make it ignore the .htaccess that is located at the root... I just don't know what the code is.

    Thanks for any advice you can offer.
    Now Hiring
    Looking for (x)html coder/ php programmer/
    WordPress expert for project work. PM me with
    your rates and work samples if you're interested.

  2. #2
    SitePoint Columnist
    Join Date
    Nov 2003
    Location
    Ohio
    Posts
    411
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I had this crop up a few times - and since our one subdirectory we needed to ignore htaccess was so critical - we ended up converting it to a sub-domain - i.e. - www.mydomain.com/other_subdirectory became subdir.mydomain.com. Resolved the issues as htaccess could then apply to all directories under main domain.
    Freelance System Administrator, Researcher, Writer
    Practical Applications
    Open Sourcery "SitePoint's Open Source Blog"

  3. #3
    FreeBSD The Power to Serve silver trophy pippo's Avatar
    Join Date
    Jul 2001
    Location
    Italy
    Posts
    4,514
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you have access to httpd.conf you can do this:

    Code:
    <Directory /path/to>
    # etc etc your settings here
    
    # allow .htaccess to all directories after /path/to
    AllowOverride All
    </Directory>
    <Directory /path/to/other_subdirectory>
    # deny htaccess to all directories after /path/to/other_subdirectory
        AllowOverride None
    </Directory>
    so that /path/to /path/to/another_dir will parse .htaccess files
    while /path/to/other_subdirectory /path/to/other_subdirectory/another_sub *won't* parse .htaccess



    Mr Andrea
    Former Hosting Team Advisor
    Former Advisor of '03


Bookmarks

Posting Permissions

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