Instructions for .htaccess?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • SemperFideles
    Senior Member
    • Oct 2006
    • 117
    • 3.7.x

    Instructions for .htaccess?

    I have my vb5 installation set up for mod_rewrite but it doesn't seem to be rewriting properly.

    The contents of my .htaccess file are as follows:

    Code:
    <IfModule mod_rewrite.c>RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?routestring=$1 [L,QSA]
    
    
    #needed because admincp is an actual directory.
    RewriteRule ^(admincp/)$ index.php?routestring=$1 [L,QSA]
    </IfModule>
    But the URL's still don't look correct.

    I noticed within the do_not_upload folder there are .htaccess files for different directories. Am I supposed to upload those?

    Is this documented anywhere?!
    Rich
  • Lynne
    Former vBulletin Support
    • Oct 2004
    • 26255

    #2
    Are you sure mod_rewrite is enabled on your server? If so, then that .htaccess file should work if put into your vb5 root directory.

    Please don't PM or VM me for support - I only help out in the threads.
    vBulletin Manual & vBulletin 4.0 Code Documentation (API)
    Want help modifying your vbulletin forum? Head on over to vbulletin.org
    If I post CSS and you don't know where it goes, throw it into the additional.css template.

    W3Schools &lt;- awesome site for html/css help

    Comment

    • MySaltyReef
      Member
      • Jul 2011
      • 91
      • 4.2.X

      #3
      Originally posted by Lynne
      Are you sure mod_rewrite is enabled on your server? If so, then that .htaccess file should work if put into your vb5 root directory.


      Hi Lynne how do i make sure mod_rewrite is enabled on my server ?
      www.mysaltyreef.com

      Comment

      • SemperFideles
        Senior Member
        • Oct 2006
        • 117
        • 3.7.x

        #4
        Originally posted by Lynne
        Are you sure mod_rewrite is enabled on your server? If so, then that .htaccess file should work if put into your vb5 root directory.
        Yes. I use Rackspace Cloud Sites and it supports .htaccess rewrite rules. Same server was supporting VBSEO.

        The real question is: What are those .htaccess files for in the do_not_upload directory.
        Rich

        Comment

        • Hartmut
          Senior Member
          • Nov 2007
          • 2870
          • 4.2.x

          #5
          Originally posted by MySaltyReef
          Hi Lynne how do i make sure mod_rewrite is enabled on my server ?
          I'm not Lynne, but anyhow: Go to AdminCP -> Maintenance -> View PHP Info and check the section for apache2handler, there you will find 'Loaded Modules'. If mod_rewrite is enable you will find 'mod_rewrite' in that list of loaded modules.
          No private support, only PM me when I ask for it. Support in the forums only.

          Comment

          • SemperFideles
            Senior Member
            • Oct 2006
            • 117
            • 3.7.x

            #6
            mod_rewrite is enabled. Again, what are the .htaccess files located in the forum, blog, and cms folders of the /do_not_upload/rewrite/apache2 folder for?

            Here's what the .htaccess file in the forum directory looks like:

            Code:
            RewriteEngine on
            
            # This file is only needed if you have set the Forum Component URL in your admincp and you are 
            # using the mod_rewrite option for friendly urls.  If this is the case, copy this file
            # to your forum component stub directory.
            
            
            # If you are having problems or are using VirtualDocumentRoot, uncomment this line and set it to your forum component directory.
            # RewriteBase /forum-stub-directory/
            
            
            # If you are having problems with the rewrite from content/ to content.php, uncomment this line to turn MultiViews off.
            # Options -MultiViews
            
            
            RewriteCond %{REQUEST_FILENAME} -s [OR]
            RewriteCond %{REQUEST_FILENAME} -l [OR]
            RewriteCond %{REQUEST_FILENAME} -d
            
            
            RewriteRule ^.*$ - [NC,L]
            
            
            # Forum
            RewriteRule ^threads/.* showthread.php [QSA]
            RewriteRule ^forums/.* forumdisplay.php [QSA]
            RewriteRule ^members/.* member.php [QSA]
            I don't know if (where?) I might have set the forum component URL and there are no instructions as to what a stub directory is. I assume this means that if I have set the forum component URL somewhere that I should upload the forum folder with the .htaccess file but I'm not sure if I need to or not.
            Rich

            Comment

            • Hartmut
              Senior Member
              • Nov 2007
              • 2870
              • 4.2.x

              #7
              Originally posted by SemperFideles
              mod_rewrite is enabled. Again, what are the .htaccess files located in the forum, blog, and cms folders of the /do_not_upload/rewrite/apache2 folder for?
              In the vBulletin package you will find only one .htaccess file in forum root.
              Originally posted by SemperFideles
              I don't know if (where?) I might have set the forum component URL and there are no instructions as to what a stub directory is. I assume this means that if I have set the forum component URL somewhere that I should upload the forum folder with the .htaccess file but I'm not sure if I need to or not.
              The file is needed for vBulletin to run, so you will definatelly have to use it.
              No private support, only PM me when I ask for it. Support in the forums only.

              Comment

              • SemperFideles
                Senior Member
                • Oct 2006
                • 117
                • 3.7.x

                #8
                Originally posted by Hartmut
                In the vBulletin package you will find only one .htaccess file in forum root.

                The file is needed for vBulletin to run, so you will definatelly have to use it.
                I understand that Hartmut but you're not reading what I wrote. There are three other .htaccess files in the /do_not_upload/rewrite/apache2 folder. What are the for?
                Rich

                Comment

                • Wayne Luke
                  vBulletin Technical Support Lead
                  • Aug 2000
                  • 74167

                  #9
                  The ones in the do_not_upload folder are for vBulletin 4.X and do not have anything to do with 5.X. They are slated to be removed from the download package. The only .htaccess file you need to worry about is the one in the upload folder.
                  Translations provided by Google.

                  Wayne Luke
                  The Rabid Badger - a vBulletin Cloud demonstration site.
                  vBulletin 5 API

                  Comment

                  • SemperFideles
                    Senior Member
                    • Oct 2006
                    • 117
                    • 3.7.x

                    #10
                    OK then I have ruled out that my .htaccess file for my root directory is incorrect. Right now my forum URL's are working but my Blog URL's are all messed up.

                    What is going on here: http://vb5.puritanboard.com/blogs
                    Rich

                    Comment

                    • Wayne Luke
                      vBulletin Technical Support Lead
                      • Aug 2000
                      • 74167

                      #11
                      Originally posted by SemperFideles
                      What is going on here: http://vb5.puritanboard.com/blogs
                      I actually don't see any issues on that page.
                      Translations provided by Google.

                      Wayne Luke
                      The Rabid Badger - a vBulletin Cloud demonstration site.
                      vBulletin 5 API

                      Comment

                      • Lynne
                        Former vBulletin Support
                        • Oct 2004
                        • 26255

                        #12
                        I believe what you are running into is the bug where all the links are the same on certain pages - is that what you are talking about? (I think it's related to this - http://tracker.vbulletin.com/browse/VBV-4746 )

                        Please don't PM or VM me for support - I only help out in the threads.
                        vBulletin Manual & vBulletin 4.0 Code Documentation (API)
                        Want help modifying your vbulletin forum? Head on over to vbulletin.org
                        If I post CSS and you don't know where it goes, throw it into the additional.css template.

                        W3Schools &lt;- awesome site for html/css help

                        Comment

                        Related Topics

                        Collapse

                        Working...