I need some help with my htaccess. Coders and programmers, please help!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tranza
    ICQ: 197-556-237
    • Jun 2003
    • 57559

    #1

    I need some help with my htaccess. Coders and programmers, please help!

    This is the deal, I installed WordPress on my server, and wanted the archives and categories to have their own folders, created automatically by WordPress (like www.tranzagals.com/2008/archives-1/).

    So I copied the code from WordPress and pasted on my .htaccess

    This is the code:

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


    And this is how my .htaccess file looked like with this addition:

    order allow,deny
    allow from all

    Options +FollowSymLinks

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?tranzagals.com.*$ [NC]
    RewriteCond %{HTTP_REFERER} !^http://(www\.)?frenchcum.com(/)?.*$ [NC]
    RewriteCond %{REMOTE_ADDR} !^208.99.195.175 [NC]
    RewriteRule \.(jpe?g|gif|bmp|png)$ - [F,NC,L]

    ErrorDocument 400 http://www.2.livejasmin.com/freechat...psprogram=REVS
    ErrorDocument 403 http://www.2.livejasmin.com/freechat...psprogram=REVS
    ErrorDocument 404 http://www.2.livejasmin.com/freechat...psprogram=REVS
    ErrorDocument 500 http://www.2.livejasmin.com/freechat...psprogram=REVS
    ErrorDocument 501 http://www.2.livejasmin.com/freechat...psprogram=REVS
    ErrorDocument 503 http://www.2.livejasmin.com/freechat...psprogram=REVS

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


    But it seems that immediately after I uploaded this file, my server started to respond real slow, and eventually all my sites on that server was down.

    Do you guys know what I did wrong? Or what might have caused this?

    Thanks for the help guys!
    I'm just a newbie.
  • Socks
    Confirmed User
    • May 2002
    • 8475

    #2
    I'm not technical, but those look like modrewrite rules for PHP.. Do you have that turned on?

    And do you want to send all your 404 traffic to livejasmin?
    Last edited by Socks; 06-26-2008, 11:03 AM.

    Comment

    • tranza
      ICQ: 197-556-237
      • Jun 2003
      • 57559

      #3
      Originally posted by Socks
      I'm not technical, but those look like modrewrite rules for PHP.. Do you have that turned on?
      No idea. How can I check that?

      Originally posted by Socks
      And do you want to send all your 404 traffic to livejasmin?
      Yes I do.

      I'm just a newbie.

      Comment

      • pornguy
        Too lazy to set a custom title
        • Mar 2003
        • 62912

        #4
        If you dont have PHP working on the server WP will not work.
        PornGuy skype me pornguy_epic

        AmateurDough The Hottes Shemales online!
        TChicks.com | Angeles Cid | Mariana Cordoba | MAILERS WELCOME!

        Comment

        • tranza
          ICQ: 197-556-237
          • Jun 2003
          • 57559

          #5
          Originally posted by pornguy
          If you dont have PHP working on the server WP will not work.
          I have PHP working and WP is working on my server.

          I have a problem when I change the way permalinks are displayed. That's all.

          What Socks said makes sense. I should change some of the permissions. I just don't know which ones!
          I'm just a newbie.

          Comment

          • Socks
            Confirmed User
            • May 2002
            • 8475

            #6
            I asked my programmer here for you Tranza, and you need to turn it on in your php.ini? If you didn't install it with PHP, you may have to re-install, but she thinks you can turn it on after install.. But not sure. If you just installed PHP, it may be easier to just re-install it with mod_rewrite enabled.

            Comment

            • ScriptWorkz
              Confirmed User
              • Jul 2007
              • 274

              #7
              You have two sets of rewrite rules in your .htaccess, i didn't even look that close, i know the familiar ones from wordpress but i didn't take the time to figure out the other ones. Chances are your creating a condition where it keeps rewriting to itself and endlessly loops.

              EDIT - looks like the other ones are anti-hotlinking, remove them temporarily to see if it fixes the problem then you can worry about how to make both sets co-exist.
              Last edited by ScriptWorkz; 06-26-2008, 11:32 AM.

              Comment

              • Socks
                Confirmed User
                • May 2002
                • 8475

                #8
                Also why are these rules different?

                RewriteCond %{HTTP_REFERER} !^http://(www\.)?tranzagals.com.*$ [NC]
                RewriteCond %{HTTP_REFERER} !^http://(www\.)?frenchcum.com(/)?.*$ [NC]

                Comment

                • tranza
                  ICQ: 197-556-237
                  • Jun 2003
                  • 57559

                  #9
                  Originally posted by Socks
                  Also why are these rules different?

                  RewriteCond %{HTTP_REFERER} !^http://(www\.)?tranzagals.com.*$ [NC]
                  RewriteCond %{HTTP_REFERER} !^http://(www\.)?frenchcum.com(/)?.*$ [NC]
                  Yes, they are. One of them is for my own domain, and the other for one know TGP to hotlink from my site.

                  I'll check out what your coder said and what ScriptWorkz said too.
                  I'm just a newbie.

                  Comment

                  • mrwilson
                    mrwilson 2.0
                    • Jul 2007
                    • 5122

                    #10
                    This should be of some help;
                    http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html

                    Comment

                    • AmateurFlix
                      Confirmed User
                      • Jul 2004
                      • 7762

                      #11
                      Originally posted by tranza
                      No idea. How can I check that?
                      name the following file phpinfo.php
                      PHP Code:
                      <?php
                      phpinfo();
                      ?>
                      load it in your browser & search for "mod_rewrite"
                      if that does not appear under "Loaded Modules", then you do not have it installed.

                      remove phpinfo.php as soon as you are done with it - there is no reason to let hackers see how your configuration is set up.

                      I'm not 100&#37; certain I'm correct about this, but 99.5% ;)

                      Comment

                      • tranza
                        ICQ: 197-556-237
                        • Jun 2003
                        • 57559

                        #12
                        Originally posted by AmateurFlix
                        name the following file phpinfo.php
                        PHP Code:
                        <?php
                        phpinfo();
                        ?>
                        load it in your browser & search for "mod_rewrite"
                        if that does not appear under "Loaded Modules", then you do not have it installed.

                        remove phpinfo.php as soon as you are done with it - there is no reason to let hackers see how your configuration is set up.

                        I'm not 100% certain I'm correct about this, but 99.5% ;)
                        Thanks for that. I'll try it.
                        I'm just a newbie.

                        Comment

                        Working...