Question on rewrite rules - APACHE

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mikesouth
    Confirmed User
    • Jun 2003
    • 6334

    #1

    Question on rewrite rules - APACHE

    Ok I have wordpress running and it has a bunch of rewrite rules

    on the same site I have added a members section with its own .htaccess which is your standard require valid user htaccess file

    problem is the directory is inheriting the rewrite rules of the parent

    I tried adding rewriteengine off at the top of the .htaccess in the child but it didnt have any effect

    how do i cancel the rewrite rules for the child so that my members area works (currently gets a 404 error that shows up in wordpress) even though the html file exists and is readable

    if i do turn the rewriteengine off is there something I need to do to make apache see it? Im lost on this stuff


    Thanks
    Mike South

    It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz.
  • teksonline
    So Fucking Banned
    • Jan 2005
    • 2904

    #2
    any subdirectory of a parent directory with a new .htaccess file should take the new ruleset, sounds to me like a web server configuration problem in this regards somehow...

    Comment

    • mikesouth
      Confirmed User
      • Jun 2003
      • 6334

      #3
      yes i understand this what I want to do is essentially turn off the rewrite rules in that subdirectory but I want to keep them in the parent and all other subdirectories
      Mike South

      It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz.

      Comment

      • mikesouth
        Confirmed User
        • Jun 2003
        • 6334

        #4
        thats why I thought simply putting rewriteengine off in the subdirectory would do the trick...but it didnt and I dont understand why...is it some sort of caching issue?
        Mike South

        It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz.

        Comment

        • teksonline
          So Fucking Banned
          • Jan 2005
          • 2904

          #5
          no, you shouldnt have to turn it off, a empty .htaccess would mean no rules..... put any membership rules of course whatever is/was there.

          you have to check httpd.conf for how you have access setup, perhaps there's new features to mod_rewrite for sub directories based on recent security issues, I have not been an freelance admin in some time as
          there is no longer a need for such a thing, so I have to say I am a bit out of the loop in the exact problem..

          maybe they now require to be setup via <directory> or ifmodule commands to proccess over the parent...

          Comment

          • teksonline
            So Fucking Banned
            • Jan 2005
            • 2904

            #6
            oh one more thing to consider is the ruleset of the parent .htaccess

            for example, maybe the request is being "captured" by the parent .htaccess file thus never executing the subdirectory request.

            based on one of the rewriterules catching all or whatever your calling

            Comment

            • mikesouth
              Confirmed User
              • Jun 2003
              • 6334

              #7
              damn well netbilling cant add their stuff because the authentication doesnt work...the hosting company said it doesnt work because of the rewrite rules in the parent.

              but none of em can tell me HOW TO MAKE IT WORK

              Just damn
              Mike South

              It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz.

              Comment

              • mikesouth
                Confirmed User
                • Jun 2003
                • 6334

                #8
                Originally posted by teksonline
                oh one more thing to consider is the ruleset of the parent .htaccess

                for example, maybe the request is being "captured" by the parent .htaccess file thus never executing the subdirectory request.

                based on one of the rewriterules catching all or whatever your calling
                I bet this is whats happening....is there a rule that will essentially say

                when going to memberdir/index.htm dont fuck with the url or matter of fact dont fuck with any url in site.com/memberdir

                I dunno squat about apache
                Mike South

                It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz.

                Comment

                • teksonline
                  So Fucking Banned
                  • Jan 2005
                  • 2904

                  #9
                  well i do know your problem is probably this now

                  RewriteCond &#37;{REQUEST_FILENAME} !-f
                  RewriteCond %{REQUEST_FILENAME} !-d
                  RewriteRule . /index.php [L]

                  but not being to keen on how wordpress works, i have no immediate idea solution, i will poke around a bit

                  Comment

                  • mikesouth
                    Confirmed User
                    • Jun 2003
                    • 6334

                    #10
                    Originally posted by teksonline
                    well i do know your problem is probably this now

                    RewriteCond %{REQUEST_FILENAME} !-f
                    RewriteCond %{REQUEST_FILENAME} !-d
                    RewriteRule . /index.php [L]

                    but not being to keen on how wordpress works, i have no immediate idea solution, i will poke around a bit
                    yup thats the wordpress .htaccess

                    and what Im looking to do is build the members area in a child directory called membersarea

                    the embers area will be completely outside of wordpress once they enter it they leave wordpress for good
                    Mike South

                    It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz.

                    Comment

                    • mikesouth
                      Confirmed User
                      • Jun 2003
                      • 6334

                      #11
                      BTW this does work on my southernbukkake.com site but it was on ccbill and had strongbox on it so it never had a problem for somereason

                      its a new members area on another site thats having the problem....
                      Mike South

                      It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz.

                      Comment

                      • teksonline
                        So Fucking Banned
                        • Jan 2005
                        • 2904

                        #12
                        do you have access to the wordpress .htaccess on that old server, i would like to see it

                        Comment

                        • mikesouth
                          Confirmed User
                          • Jun 2003
                          • 6334

                          #13
                          its the same as the one you posted and also the same as the one on mikesouth.com which is the site having the problem

                          I think the difference is in the .htaccess provided by strongbox...its huge and has a ton of stuff I dont understand in it
                          Mike South

                          It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz.

                          Comment

                          • mikesouth
                            Confirmed User
                            • Jun 2003
                            • 6334

                            #14
                            but the problem is I cant have strong box on it till netbilling is set up
                            and netbilling cant set up until authentication works
                            Last edited by mikesouth; 12-22-2007, 10:28 PM.
                            Mike South

                            It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz.

                            Comment

                            • teksonline
                              So Fucking Banned
                              • Jan 2005
                              • 2904

                              #15
                              start small

                              on the new blog, create a subdirectory called test
                              inside test create a .htaccess
                              ----- .htaccess file
                              RewriteEngine On
                              ----- end .htaccess file

                              ok now inside this test directory make a file called moo.html

                              .... moo.html contents
                              MOO
                              ... end moo.html

                              ok now call this file... does it load in your browser and show MOO?

                              if so,

                              edit .htacces file in test subdirectory
                              .... insert this line at end of file
                              RewriteRule ^moo.html$ /foo.html


                              no reload moo.html does it redirect to a 404 page? it should meaning
                              everythign is working fine

                              Comment

                              • teksonline
                                So Fucking Banned
                                • Jan 2005
                                • 2904

                                #16
                                and for a final note, try calling your members section something else, maybe something inside wordpress uses members or a members.php or something thus causign the confliction

                                Comment

                                • mikesouth
                                  Confirmed User
                                  • Jun 2003
                                  • 6334

                                  #17
                                  Originally posted by teksonline
                                  start small

                                  on the new blog, create a subdirectory called test
                                  inside test create a .htaccess
                                  ----- .htaccess file
                                  RewriteEngine On
                                  ----- end .htaccess file

                                  ok now inside this test directory make a file called moo.html

                                  .... moo.html contents
                                  MOO
                                  ... end moo.html

                                  ok now call this file... does it load in your browser and show MOO?

                                  if so,

                                  edit .htacces file in test subdirectory
                                  .... insert this line at end of file
                                  RewriteRule ^moo.html$ /foo.html


                                  no reload moo.html does it redirect to a 404 page? it should meaning
                                  everythign is working fine
                                  all this worked perfectly just as you said it should
                                  Mike South

                                  It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz.

                                  Comment

                                  • mikesouth
                                    Confirmed User
                                    • Jun 2003
                                    • 6334

                                    #18
                                    ok now this makes NO sense
                                    i move the members dire and the content into test and I can access it

                                    then I move the .htaccess file (looks like this)

                                    AuthUserFile /home/user/public_html/sitename/cgi-bin/.htpasswd
                                    AuthGroupFile /dev/null
                                    AuthName Members
                                    AuthType Basic
                                    require valid-user

                                    into the dir and it breaks again and stays broken even after I remove the .htaccess file or replace it with one that simply says rewriteengine on
                                    Mike South

                                    It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz.

                                    Comment

                                    • mikesouth
                                      Confirmed User
                                      • Jun 2003
                                      • 6334

                                      #19
                                      I guess I will pick this up tomorrow...I sure dont get it ...I do deeply appreciate your help
                                      Mike South

                                      It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz.

                                      Comment

                                      • teksonline
                                        So Fucking Banned
                                        • Jan 2005
                                        • 2904

                                        #20
                                        then there's no real problem... all is working fine .htaccess wise.


                                        you can try as suggested above and rename your members subdirectory to something else and see if its functioning the same,

                                        also try calling a html file etc in that subdirectory...
                                        debug from there

                                        Comment

                                        • teksonline
                                          So Fucking Banned
                                          • Jan 2005
                                          • 2904

                                          #21
                                          np, the wordpress template or wordpress itself probably is interpreting the members as members.php and taking control from there..

                                          Comment

                                          • mikesouth
                                            Confirmed User
                                            • Jun 2003
                                            • 6334

                                            #22
                                            it works fine UNTIL I put a .htaccess file in there requiring validation...then iyt breaks...and whats weird is it stays broken even after I remove the .htaccess file completely
                                            Mike South

                                            It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz.

                                            Comment

                                            • mikesouth
                                              Confirmed User
                                              • Jun 2003
                                              • 6334

                                              #23
                                              if ya want Im happy to give you access to it via ssh shoot me an email to [email protected]
                                              Mike South

                                              It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz.

                                              Comment

                                              • mikesouth
                                                Confirmed User
                                                • Jun 2003
                                                • 6334

                                                #24
                                                oh and I dont call it members
                                                Mike South

                                                It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz.

                                                Comment

                                                • teksonline
                                                  So Fucking Banned
                                                  • Jan 2005
                                                  • 2904

                                                  #25
                                                  hehe, sounds like browser cache is giving you problem as well..
                                                  always hold down ctrl-key when reloading pages...

                                                  Comment

                                                  • mikesouth
                                                    Confirmed User
                                                    • Jun 2003
                                                    • 6334

                                                    #26
                                                    and it broke moo.html
                                                    Mike South

                                                    It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz.

                                                    Comment

                                                    • mikesouth
                                                      Confirmed User
                                                      • Jun 2003
                                                      • 6334

                                                      #27
                                                      Originally posted by teksonline
                                                      hehe, sounds like browser cache is giving you problem as well..
                                                      always hold down ctrl-key when reloading pages...
                                                      ok THAT could be
                                                      Mike South

                                                      It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz.

                                                      Comment

                                                      • mikesouth
                                                        Confirmed User
                                                        • Jun 2003
                                                        • 6334

                                                        #28
                                                        BINGO...so now i know why it stays broken....Ok I guess Im staying up after all

                                                        at least now I know why my mods to htaccess didnt seem to do anything
                                                        Mike South

                                                        It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz.

                                                        Comment

                                                        • teksonline
                                                          So Fucking Banned
                                                          • Jan 2005
                                                          • 2904

                                                          #29
                                                          its me from adlt.xxx before someone spoofs me and hacks your box lol

                                                          Comment

                                                          • woj
                                                            <&(©¿©)&>
                                                            • Jul 2002
                                                            • 47882

                                                            #30
                                                            just create a subdomain
                                                            instead of domain.com/members/
                                                            do members.domain.com
                                                            Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
                                                            Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
                                                            Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager

                                                            Comment

                                                            • teksonline
                                                              So Fucking Banned
                                                              • Jan 2005
                                                              • 2904

                                                              #31
                                                              thats no fun

                                                              Comment

                                                              • mikesouth
                                                                Confirmed User
                                                                • Jun 2003
                                                                • 6334

                                                                #32
                                                                ok teksonline...sent

                                                                setting up a subdomain might be a good sultion...dont know how to do it but i bet its easier to figure out than this...
                                                                Mike South

                                                                It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz.

                                                                Comment

                                                                • Damian_Maxcash
                                                                  So Fucking Banned
                                                                  • Oct 2002
                                                                  • 12745

                                                                  #33
                                                                  I am not great at this stuff - but have you got the SEO URL option turned on?

                                                                  If you can use short urls like www.mybog.com/mypost then every request will trigger .htaccess to try and rewrite it. If it cant handle it, it will 404.

                                                                  Probably too simple, but sometimes its the simple things

                                                                  Comment

                                                                  • mikesouth
                                                                    Confirmed User
                                                                    • Jun 2003
                                                                    • 6334

                                                                    #34
                                                                    im south1226 on aol or yahoo IM btw
                                                                    Mike South

                                                                    It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz.

                                                                    Comment

                                                                    • mikesouth
                                                                      Confirmed User
                                                                      • Jun 2003
                                                                      • 6334

                                                                      #35
                                                                      Originally posted by Damian_Maxcash
                                                                      I am not great at this stuff - but have you got the SEO URL option turned on?

                                                                      If you can use short urls like www.mybog.com/mypost then every request will trigger .htaccess to try and rewrite it. If it cant handle it, it will 404.

                                                                      Probably too simple, but sometimes its the simple things
                                                                      I do have that plugin
                                                                      Mike South

                                                                      It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz.

                                                                      Comment

                                                                      • Damian_Maxcash
                                                                        So Fucking Banned
                                                                        • Oct 2002
                                                                        • 12745

                                                                        #36
                                                                        Originally posted by mikesouth
                                                                        I do have that plugin
                                                                        I wasnt thinking of the seo plugin - I was thinking of permalinks.

                                                                        Do you have them turned on?

                                                                        Remember I might just be confusing the issue - ignore me if you are not sure.

                                                                        But I know that permalinks (in options) will mess around with all urls it trys to read and dosnt understand.... For example if you have added something to .htaccess to make it work with something else.

                                                                        Comment

                                                                        • mikesouth
                                                                          Confirmed User
                                                                          • Jun 2003
                                                                          • 6334

                                                                          #37
                                                                          ya i have permalinks set that way too...but sounds like teksonline knows what he is doing...maybe he can be of help

                                                                          Im friggin lost
                                                                          Mike South

                                                                          It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz.

                                                                          Comment

                                                                          • teksonline
                                                                            So Fucking Banned
                                                                            • Jan 2005
                                                                            • 2904

                                                                            #38
                                                                            well, i see it works fine.

                                                                            i see two problems

                                                                            your .htaccess file is the strangest i have come across that uses
                                                                            an allow ip structure..

                                                                            allow ip
                                                                            allow ip
                                                                            allow ip
                                                                            deny

                                                                            so basically if a surfers ip is not in here, he is denied access to members section ( so i assume you have some sorta software that adds these ip's)

                                                                            so i go to 2nd problem and most likely culprit
                                                                            AuthUserFile /usr/home/blah/blah/blah/blah/blah/password/.htpasswd

                                                                            this is invalid path, so therefor it has nothing to authenticate

                                                                            Comment

                                                                            • mikesouth
                                                                              Confirmed User
                                                                              • Jun 2003
                                                                              • 6334

                                                                              #39
                                                                              yer lookin in the wrong dir


                                                                              that members dir is old and inactive


                                                                              look at newmembers
                                                                              Mike South

                                                                              It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz.

                                                                              Comment

                                                                              • teksonline
                                                                                So Fucking Banned
                                                                                • Jan 2005
                                                                                • 2904

                                                                                #40
                                                                                didnt see a newmembers but i did see a newemembers

                                                                                Comment

                                                                                • mikesouth
                                                                                  Confirmed User
                                                                                  • Jun 2003
                                                                                  • 6334

                                                                                  #41
                                                                                  fuck i renamed it wrong
                                                                                  Mike South

                                                                                  It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz.

                                                                                  Comment

                                                                                  • mikesouth
                                                                                    Confirmed User
                                                                                    • Jun 2003
                                                                                    • 6334

                                                                                    #42
                                                                                    no i didnt newmembers is there
                                                                                    Mike South

                                                                                    It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz.

                                                                                    Comment

                                                                                    • teksonline
                                                                                      So Fucking Banned
                                                                                      • Jan 2005
                                                                                      • 2904

                                                                                      #43
                                                                                      hehe refresh that newmembers directory now, you see that wierd hiccup on refresh?

                                                                                      Comment

                                                                                      • mikesouth
                                                                                        Confirmed User
                                                                                        • Jun 2003
                                                                                        • 6334

                                                                                        #44
                                                                                        ya i do see that


                                                                                        is it trying to rewrite the password directory?
                                                                                        Mike South

                                                                                        It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz.

                                                                                        Comment

                                                                                        • teksonline
                                                                                          So Fucking Banned
                                                                                          • Jan 2005
                                                                                          • 2904

                                                                                          #45
                                                                                          where is your error logs, nm, i found em

                                                                                          Comment

                                                                                          • teksonline
                                                                                            So Fucking Banned
                                                                                            • Jan 2005
                                                                                            • 2904

                                                                                            #46
                                                                                            [Sun Dec 23 03:56:19 2007] [error] [client xx.xx.xx.xx] client denied by server configuration: /home/<changed>/public_html/<changed>/newmembers

                                                                                            Comment

                                                                                            • mikesouth
                                                                                              Confirmed User
                                                                                              • Jun 2003
                                                                                              • 6334

                                                                                              #47
                                                                                              ok whats that mean....
                                                                                              Mike South

                                                                                              It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz.

                                                                                              Comment

                                                                                              • teksonline
                                                                                                So Fucking Banned
                                                                                                • Jan 2005
                                                                                                • 2904

                                                                                                #48
                                                                                                you recently change name servers or any goofyness like that? i can't even create a error log entry all of a sudden, tells me the request is going to some other server

                                                                                                Comment

                                                                                                • mikesouth
                                                                                                  Confirmed User
                                                                                                  • Jun 2003
                                                                                                  • 6334

                                                                                                  #49
                                                                                                  no nameserver changes in over 3 months
                                                                                                  Mike South

                                                                                                  It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz.

                                                                                                  Comment

                                                                                                  • mikesouth
                                                                                                    Confirmed User
                                                                                                    • Jun 2003
                                                                                                    • 6334

                                                                                                    #50
                                                                                                    does it tell you the ip of the other server?
                                                                                                    Mike South

                                                                                                    It's No wonder I took up drugs and alcohol, it's the only way I could dumb myself down enough to cope with the morons in this biz.

                                                                                                    Comment

                                                                                                    Working...