Tap the technical and computer knowledge of other experienced users. Find information on computers and technological topics.

Vbulletin 5 .htaccess File - Performance

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Vbulletin 5 .htaccess File - Performance

    PHP Code:
    RewriteOptions inherit
    AddHandler application
    /x-httpd-php70 .php .php5 .php4 .php3

    RewriteEngine On
    RewriteCond 
    %{HTTP_HOST} !^www\.christforums\.org [OR,NC]
    RewriteCond %{HTTPSoff
    RewriteRule 
    https://www.christforums.org%{REQUEST_URI} [NE,R=301,L]
    RewriteCond %{HTTP_HOST} ^christforums\.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.christforums\.com$
    RewriteRule https://www.christforums.org%{REQUEST_URI} [NE,R=301,L]
    RewriteCond %{HTTP_HOST} ^christforums\.net$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.christforums\.net$
    RewriteRule ^/?$ "https\:\/\/www\.christforums\.org\/" [R=301,L]
    RewriteCond %{HTTP_HOST} ^religiousverse\.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.religiousverse\.com$
    RewriteRule ^(.*)$ "https\:\/\/www\.christforums\.org\/$1" [R=301,L]
    RewriteCond %{HTTP_HOST} ^christforums\.org$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.christforums\.org$
    RewriteRule ^main"https\:\/\/www\.christforums\.org\/" [R=301,L]
    RewriteCond %{HTTP_HOST} ^christianforums\.org$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.christianforums\.org$
    RewriteRule ^/?$ "https\:\/\/www\.christforums\.org\/" [R=301,L]
    RewriteCond %{HTTP_HOST} ^reformedchristians\.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.reformedchristians\.com$
    RewriteRule ^/?$ "https\:\/\/www\.christforums\.org\/" [R=301,L]
    RewriteCond %{HTTP_HOST} ^reformedchristianity\.net$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.reformedchristianity\.net$
    RewriteRule ^/?$ "https\:\/\/www\.christforums\.org\/" [R=301,L]
    RewriteCond %{HTTP_HOST} ^reformedchristianity\.org$ [OR]
    RewriteCond %{HTTP_HOST} ^www\.reformedchristianity\.org$
    RewriteRule ^/?$ "https\:\/\/www\.christforums\.org\/" [R=301,L]


    <
    IfModule mod_rewrite.c>
        
    RewriteEngine On
        
    #In some cases where you have other mod_rewrite rules, you may need to comment out the following line
        #and change it to match your folder name. This resets the other mod_rewrite rules for just this directory
        #If your site was www.example.com/forum, the setting would be /forum/
        #RewriteBase /
        # Send css calls directly to the correct file VBV-7807
        
    RewriteRule ^css.phpcore/css.php [NC,L]
        
    # Redirect old install path to core.
        
    RewriteRule ^installcore/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=$[L,QSA]
        
    # Because admincp is an actual directory.
        
    RewriteRule ^(admincp/)$ index.php?routestring=$[L,QSA]
    </
    IfModule>
    # START E-Tag
    <ifModule mod_headers.c>
    Header unset ETag
    </ifModule>
    FileETag None
    # END E-Tag
    <IfModule mod_expires.c>
        
    ExpiresActive On
        ExpiresByType application
    /x-javascript "access 1 year"
        
    ExpiresByType text/javascript "access 1 year"
        
    ExpiresByType application/javascript "access 1 year"
        
    ExpiresByType text/css "access 1 week"
        
    ExpiresByType image/x-icon "access 1 year"
        
    ExpiresByType image/icon "access 1 year"
        
    ExpiresByType application/x-ico "access 1 year"
        
    ExpiresByType application/ico "access 1 year"
        
    ExpiresByType image/gif "access 1 year"
        
    ExpiresByType image/jpeg "access 1 year"
        
    ExpiresByType image/jpg "access 1 year"
        
    ExpiresByType image/png "access 1 year"
        
    ExpiresByType application/x-shockwave-flash "access 1 year"
        
    ExpiresByType font/ttf "access 1 year"
        
    ExpiresByType font/otf "access 1 year"
        
    ExpiresByType font/x-woff "access 1 year"
        
    ExpiresByType image/svg+xml "access 1 year"
        
    ExpiresByType font/truetype "access 1 year"
        
    ExpiresByType font/opentype "access 1 year"
        
    ExpiresByType application/x-font-woff "access 1 year"
        
    ExpiresByType application/vnd.ms-fontobject "access 1 year"
        
    ExpiresByType text/html "access 1 year"
    </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, public"
        
    </filesmatch>
        <
    filesmatch "\.(js)$">
            
    Header set Cache-Control "max-age=1209600, public"
        
    </filesmatch>
    </
    IfModule>
    <
    IfModule mod_deflate.c>
        
    AddOutputFilterByType DEFLATE application/atom+xml \
                              
    text/javascript \
                              
    application/x-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

  • #2
    Got it, thanks!
    Comment>

    • #3
      Originally posted by Silas View Post
      Got it, thanks!
      lol Now that was funny.

      Comment>

      • #4
        Can you help me out with the Xenforo to vBulletin .htaccess URL redirects?

        Xenforo says it's this for vBulletin to Xenforo:
        Code:
         RewriteEngine On  
        RewriteRule ^forum/.+/([0-9]+)-([^/]+$|[^/]+/page[0-9]+$) /threads/$1/? [R=301,L]
        But what is it for Xenforo to vBulletin? From experience can you examine the code and help me out. If that's what it is to Xenforo, then what is it the other way around? You'll have to excuse me as I know nothing about regular expressions. It shouldn't be too hard for someone to turn it the other way around though.
        Comment>

        • #5
          Originally posted by Cloud View Post
          Can you help me out with the Xenforo to vBulletin .htaccess URL redirects?

          Xenforo says it's this for vBulletin to Xenforo:
          Code:
          RewriteEngine On
          RewriteRule ^forum/.+/([0-9]+)-([^/]+$|[^/]+/page[0-9]+$) /threads/$1/? [R=301,L]
          But what is it for Xenforo to vBulletin? From experience can you examine the code and help me out. If that's what it is to Xenforo, then what is it the other way around? You'll have to excuse me as I know nothing about regular expressions. It shouldn't be too hard for someone to turn it the other way around though.
          Sorry, above the scope of my personal knowledge. I have none with Xenforo either.

          I think that you really do not need worry about this. Just submit a sitemap to Google. Your site hasn't enough links to really concern me if I was its owner. With the amount of pages on your site, Google will re-index the entire site in only a very short time.

          God bless,
          William
          Comment>
          Working...
          X
          Articles - News - SiteMap