htaccess not working in sub directories, why?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • acctman
    Confirmed User
    • Oct 2003
    • 2840

    #1

    htaccess not working in sub directories, why?

    I have a site on my server that required php4 (uses custom CMS), so the webroot is set to php4 for it. By the default my server is php5.2 and when trying to run a php5 script under a sub directory it does not process. I can't seem to get php4 and php5 scripts to run under the same webroot in separate sub directories. Is there something in my httpd.conf that I need to change? i'm running apache2.2..
  • HomerSimpson
    Too lazy to set a custom title
    • Sep 2005
    • 13826

    #2
    if you have set up /path/site to php4
    /path/site/subfolder will also be php4
    Make a bank with Chaturbate - the best selling webcam program
    Ads that can't be block with AdBlockers !!! /// Best paying popup program (Bitcoin payouts) !!!

    PHP, MySql, Smarty, CodeIgniter, Laravel, WordPress, NATS... fixing stuff, server migrations & optimizations... My ICQ: 27429884 | Email:

    Comment

    • acctman
      Confirmed User
      • Oct 2003
      • 2840

      #3
      Originally posted by HomerSimpson
      if you have set up /path/site to php4
      /path/site/subfolder will also be php4
      correct, but i want /path/site/subfolder1 to be php5 i've set a .htaccess with AddHandler application/x-httpd-php5 .php in it, but its not accepting the change. still reading as php4

      Comment

      • Tempest
        Too lazy to set a custom title
        • May 2004
        • 10217

        #4
        Talk to your host about it.. I doubt you can solve it in an htaccess file.

        Comment

        • Barry-xlovecam
          It's 42
          • Jun 2010
          • 18083

          #5
          As a general note: the first .htaccess has priority ...

          Comment

          • acctman
            Confirmed User
            • Oct 2003
            • 2840

            #6
            I think it has something to do with the AllowOverride setting in httpd.conf but I'm only seeing Satisfy All under <FileMatch "^\.ht"> and when adding AllowOverride All I receive a warning. Apache 2.2 split up the httpd.conf settings so I'm not sure which include holds the correct settings. From doing some research if .htaccess aren't processing in sub directories then AllowOverride is set to None and needs to be set to All.

            was trying to avoid having to submit a ticket to my datacenter but i guess i'll do that

            Comment

            • V_RocKs
              Damn Right I Kiss Ass!
              • Nov 2003
              • 32468

              #7
              Maybe it'd be easier to fix the issues in the CMS to work with PHP5...

              Can't wait for 6.

              Comment

              • Barry-xlovecam
                It's 42
                • Jun 2010
                • 18083

                #8
                We had a problem with a promo tool that uses rewrites in .htaccess subdirectories.

                Maybe, this might help ...

                Code:
                Note: There may be a  long file like httpd.conf that may contain your domain's  configuration.
                
                Edit your domain configuration;
                
                pico /etc/apache2/sites-available/doc_root
                
                Set the Overide for your domain configuration
                Paste with your path;
                
                <Directory "/home/user_name/www/public_html/domain">
                 AllowOverride All
                </Directory>
                
                Then;
                Cntl+X
                Y
                enterkey
                
                Then restart the Apache server
                This was part of the manual fix instructions I did.

                Comment

                • acctman
                  Confirmed User
                  • Oct 2003
                  • 2840

                  #9
                  Originally posted by V_RocKs
                  Maybe it'd be easier to fix the issues in the CMS to work with PHP5...

                  Can't wait for 6.
                  I was planning on waiting till 6 before doing anything. I just hope 6 will process 5 scripts with no problem

                  Comment

                  • CurrentlySober
                    Too lazy to wipe my ass
                    • Aug 2002
                    • 39088

                    #10
                    htaccess not working in sub directories, why?
                    Because you smell of poo?
                    ️ ️

                    Comment

                    • acctman
                      Confirmed User
                      • Oct 2003
                      • 2840

                      #11
                      Originally posted by Barry-xlovecam
                      We had a problem with a promo tool that uses rewrites in .htaccess subdirectories.

                      Maybe, this might help ...

                      Code:
                      Note: There may be a  long file like httpd.conf that may contain your domain's  configuration.
                      
                      Edit your domain configuration;
                      
                      pico /etc/apache2/sites-available/doc_root
                      
                      Set the Overide for your domain configuration
                      Paste with your path;
                      
                      <Directory "/home/user_name/www/public_html/domain">
                       AllowOverride All
                      </Directory>
                      
                      Then;
                      Cntl+X
                      Y
                      enterkey
                      
                      Then restart the Apache server
                      This was part of the manual fix instructions I did.
                      thanks, that worked!

                      Comment

                      • Barry-xlovecam
                        It's 42
                        • Jun 2010
                        • 18083

                        #12
                        cool

                        Comment

                        • fris
                          I have to go potty
                          • Aug 2002
                          • 56059

                          #13
                          php4 is pretty new
                          Since 1999: 69 Adult Industry awards for Best Hosting Company and professional excellence.


                          Only Fans Data

                          20+ Custom Adult Themes and Plugins

                          Comment

                          Working...