,htaccess file info please

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pwhitehead
    Member
    • Jun 2010
    • 75
    • 4.2.X

    ,htaccess file info please

    Can a dev post an example of what should be in this file now what i'm actually uploading this to my webhost. I never had to worry about using a .htaccess file cause i was testing on a local host.
  • AliMadkour
    Senior Member
    • Dec 2004
    • 1588
    • 6.X

    #2
    Here is a copy of the default .htaccess

    Code:
    <IfModule mod_rewrite.c>
        RewriteEngine On
    
        # Send css calls directly to the correct file VBV-7807
        RewriteRule ^css.php$ core/css.php [NC,L]
    
        # Redirect old install path to core.
        RewriteRule ^install/ core/install/ [NC,L]
    
        # Main Redirect
        RewriteCond %{REQUEST_URI} !\.(gif|jpg|jpeg|png|css)$
        RewriteCond %{REQUEST_FILENAME} !-f
        RewriteCond %{REQUEST_FILENAME} !-d
        RewriteRule ^(.*)$ index.php?routestring=$1 [L,QSA]
    
        # Because admincp is an actual directory.
        RewriteRule ^(admincp/)$ index.php?routestring=$1 [L,QSA]
    
    </IfModule>
    
    <IfModule mod_deflate.c>
        AddOutputFilterByType DEFLATE application/atom+xml \
                              text/javascript \
                              application/javascript \
                              application/json \
                              application/rss+xml \
                              application/vnd.ms-fontobject \
                              application/x-font-ttf \
                              application/xhtml+xml \
                              application/xml \
                              font/opentype \
                              image/svg+xml \
                              image/x-icon \
                              text/css \
                              text/html \
                              text/plain \
                              text/x-component \
                              text/xml
    </IfModule>
    
    <IfModule mod_expires.c>
        ExpiresActive On
        ExpiresByType application/x-javascript A1209600
        ExpiresByType text/javascript A1209600
        ExpiresByType application/javascript A1209600
        ExpiresByType text/css A31536000
        ExpiresByType image/x-icon A2592000
        ExpiresByType image/icon A2592000
        ExpiresByType application/x-ico A2592000
        ExpiresByType application/ico A2592000
        ExpiresByType image/gif A2592000
        ExpiresByType image/jpeg A1209600
        ExpiresByType image/jpg A1209600
        ExpiresByType image/png A1209600
        ExpiresByType application/x-shockwave-flash A1209600
        ExpiresByType font/ttf A2592000
        ExpiresByType font/otf A2592000
        ExpiresByType font/x-woff A2592000
        ExpiresByType image/svg+xml A2592000
        ExpiresByType font/truetype A2592000
        ExpiresByType font/opentype A2592000
        ExpiresByType application/x-font-woff A2592000
        ExpiresByType application/vnd.ms-fontobject A2592000
    </IfModule>
    
    <IfModule mod_headers.c>
        Header set Connection keep-alive
        <filesmatch "\.(ico|flv|gif|swf|eot|woff|otf|ttf|svg)$">
            Header set Cache-Control "max-age=2592000, public"
        </filesmatch>
        <filesmatch "\.(jpg|jpeg|png)$">
            Header set Cache-Control "max-age=1209600, public"
        </filesmatch>
        <filesmatch "\.(eot|woff|otf|ttf|svg)$">
            Header set Cache-Control "max-age=2592000, public"
        </filesmatch>
        # css and js should use private for proxy caching https://developers.google.com/speed/docs/best-practices/caching#LeverageProxyCaching
        <filesmatch "\.(css)$">
            Header set Cache-Control "max-age=31536000, private"
        </filesmatch>
        <filesmatch "\.(js)$">
            Header set Cache-Control "max-age=1209600, private"
        </filesmatch>
    </IfModule>

    Former vBulletin Support Staff
    Need Help?, Or P.M. Me

    Comment

  • pwhitehead
    Member
    • Jun 2010
    • 75
    • 4.2.X

    #3
    should the .htaccess file b in the vb5 directory or the public_html directory? i'm trying to load the install file http://mysite.com/vb5/core/install/install.php and nothing seems to wana load..

    Comment

    • AliMadkour
      Senior Member
      • Dec 2004
      • 1588
      • 6.X

      #4
      It should be in your vBulletin 5 root directory.

      Former vBulletin Support Staff
      Need Help?, Or P.M. Me

      Comment

      • pwhitehead
        Member
        • Jun 2010
        • 75
        • 4.2.X

        #5
        Originally posted by AliMadkour
        It should be in your vBulletin 5 root directory.
        public_html/vb5/core/vb5/route or just public_html/vb5?

        Comment

        • AliMadkour
          Senior Member
          • Dec 2004
          • 1588
          • 6.X

          #6
          public_html/vb5

          Also, you need to add this to your .htaccess:

          RewriteBase /vb5/

          right under:
          RewriteEngine On

          Former vBulletin Support Staff
          Need Help?, Or P.M. Me

          Comment

          • pwhitehead
            Member
            • Jun 2010
            • 75
            • 4.2.X

            #7
            weird, still cant load install file.. worked fine on a local host, but when i try n put on bluehost no luck..

            Comment

            • AliMadkour
              Senior Member
              • Dec 2004
              • 1588
              • 6.X

              #8
              Please fill out a support ticket at:



              Please include a complete description of the problem and be sure to include the login info to your Admin CP, phpMyAdmin and FTP in the 'Sensitive Data' field.

              Former vBulletin Support Staff
              Need Help?, Or P.M. Me

              Comment

              • pwhitehead
                Member
                • Jun 2010
                • 75
                • 4.2.X

                #9
                Originally posted by AliMadkour
                Please fill out a support ticket at:



                Please include a complete description of the problem and be sure to include the login info to your Admin CP, phpMyAdmin and FTP in the 'Sensitive Data' field.
                I did as you said.

                Comment

                • pwhitehead
                  Member
                  • Jun 2010
                  • 75
                  • 4.2.X

                  #10
                  Here's the solution...

                  Comment

                  Related Topics

                  Collapse

                  Working...