Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 10 of 10

This is a discussion on .htaccess issue in the Shared & Semi-Dedicated forum
My site, http://www.lyricsdatabase.net (just bought 2 days ago) requires the following .htaccess file in order to operate, which is in the root of my directories: ...

  1. #1
    Loyal Client
    Join Date
    Apr 2002
    Posts
    92

    .htaccess issue

    My site, http://www.lyricsdatabase.net (just bought 2 days ago) requires the following .htaccess file in order to operate, which is in the root of my directories:

    Code:
    RewriteEngine On
    
    RewriteCond %{HTTP_HOST} bosslyrics.com
    RewriteRule ^(.*)$ http://www.bosslyrics.com/$1 [NE,L]
    
    RewriteRule ^(external|admin)/(.+)$ $1/$2 [QSA,L,NE]
    
    RewriteRule ^([a-z0-9]+)$ index.php?mod=$1 [QSA]
    RewriteRule ^([\sA-Za-z0-9_\.-]+)/([\s\.A-Za-z0-9_-]+)$ index.php?mod=$1&sub=$2 [QSA]
    I just installed vBulletin at http://www.lyricsdatabase.net/forums/ and it appears that htaccess is keeping it from running. Since I need the file to have the lyrics database run, is there something I can add that would exclude the forums directory?

    Thanks,

    -Jim

  2. #2
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    I'm not good at eyeballing mod_rewrite rules and suggesting fixes without testing them first, but here it goes... It looks like changing the second RewriteRule to ^(external|admin|forums)... might do the trick, but without testing it I can't say it will for sure. Give it a shot and see what happens...

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  3. #3
    Jag Veteran
    Join Date
    Sep 2002
    Posts
    650
    Quote Originally Posted by jimnyc
    I just installed vBulletin at http://www.lyricsdatabase.net/forums/ and it appears that htaccess is keeping it from running.
    When I access http://www.lyricsdatabase.net/forums/, I see the following message:
    Sorry, but there is a problem with our scripts!

    You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 1' at line 1
    UPDATE lyrics SET monthhits=monthhits+1, hits=hits+1 WHERE id= LIMIT 1
    Is this the forums problem you are blaming .htaccess for?

  4. #4
    the Windlord Gwaihir's Avatar
    Join Date
    Jun 2002
    Posts
    2,562
    As gerilya says: you sure it is .htaccess given you trouble there?

    Anyway: if you just want that .htaccess to have no effect for the forums folder, put another .htaccess in that folder with this simple statement: RewriteEngine off. Statements in .htaccess files override eachother top down, so anything set on a higher level folder can easily be overridden / undone on a more specific one.
    Regards,

    Wim Heemskerk
    ---
    Visit MeCCG.net - Cardgaming in J.R.R. Tolkien's Middle-earth
    And Gwaihir.net - The Middle-earth CCG store

  5. #5
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,775
    A couple of things you might try...

    First of all, comment out these lines, and see if it makes any difference:
    Code:
    RewriteEngine On
    
    #RewriteCond %{HTTP_HOST} bosslyrics.com
    #RewriteRule ^(.*)$ http://www.bosslyrics.com/$1 [NE,L]
    
    #RewriteRule ^(external|admin)/(.+)$ $1/$2 [QSA,L,NE]
    
    #RewriteRule ^([a-z0-9]+)$ index.php?mod=$1 [QSA]
    #RewriteRule ^([\sA-Za-z0-9_\.-]+)/([\s\.A-Za-z0-9_-]+)$ #index.php?mod=$1&sub=$2 [QSA]
    If it starts working, uncomment the lines one at a time, until it stops working again, and you've found the culprit.

    Secondly, you might try putting a .htaccess file in your forum folder containing simply:
    Code:
    RewriteEngine On
    Last edited by Vin DSL; 06-21-2005 at 10:16 AM.
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL © 2010

  6. #6
    || $name ne 'R.Stiltskin'
    Join Date
    Jun 2003
    Location
    Tejas
    Posts
    2,438

    Lightbulb

    Quote Originally Posted by Gwaihir
    ...if you just want that .htaccess to have no effect for the forums folder, put another .htaccess in that folder with this simple statement: RewriteEngine off...
    A very good debugging tip.

    Based on that, I'd suggest another:

    Place a comment in the top-level .htaccess file that you overrode this directive in the "forums" directory. It may save you some troubleshooting grief in the future when you forget what got turned on/off lower in the hierarchy. This is one of the pitfalls of editing .htaccess throughout your serving space - remembering the tweaks. The advantage is that Apache may be tweaked ad infinitum. The disadvantage is that Apache may be tweaked ad infinitum. Commenting such "major" modifications will help you in the long run.

  7. #7
    Loyal Client
    Join Date
    Apr 2002
    Posts
    92
    Secondly, you might try putting a .htaccess file in your forum folder containing simply:
    Code:
    RewriteEngine On
    That did the trick, thanks very much!

  8. #8
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,775
    Quote Originally Posted by jimnyc
    That did the trick, thanks very much!
    My pleasure!

    Bet that's got the 'experts' scratching their collective heads. Counterintuitive, you know?

    Anyone care to take a guess why that worked?
    Last edited by Vin DSL; 06-21-2005 at 01:21 PM.
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL © 2010

  9. #9
    the Windlord Gwaihir's Avatar
    Join Date
    Jun 2002
    Posts
    2,562
    Quote Originally Posted by Vin DSL
    Anyone care to take a guess why that worked?
    For the same reason that 'RewriteEngine off' works: because it overrides the set of rewrite rules given higher up.

    That is: I do assume that 'off' works too, right? Real guessing starts if it doesn't.
    Regards,

    Wim Heemskerk
    ---
    Visit MeCCG.net - Cardgaming in J.R.R. Tolkien's Middle-earth
    And Gwaihir.net - The Middle-earth CCG store

  10. #10
    Yeah, I know a LOT! Vin DSL's Avatar
    Join Date
    Mar 2003
    Location
    Arizona Uplands
    Posts
    10,775
    Heh!
    DISCLAIMER Any resemblance between the views expressed above and those of the owners and operators of this system is purely coincidental. Any resemblance between these views and my own are non-deterministic. The existence of Vin DSL is questionable. The existence of views in the absence of anyone to hold them is problematic. The existence of the reader is left as an exercise in the second-order coefficient.

    No Guts, No Story! VinDSL © 2010

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
  •