IPB .htaccess Furls and Litespeed Cache

Discussion in 'LiteSpeed Cache' started by vamman, Oct 28, 2011.

  1. vamman

    vamman New Member

    Hey folks,

    I followed this tutorial to the letter for our IPB Board.
    http://litespeedtech.com/support/wiki/doku.php?id=litespeed_wiki:litespeed:cache:ipboard

    This is a big board and we thought we had the .htaccess fine tuned for the forums but it appears not. Seemed when we setup the IPB SE Friendly URLs .htaccess rule with the litespeed .htaccess rule and some visitors started reciecing infinite redirect notices using mobiles and google translator. Upon inspection it appears we failed at the rule rewrite mod for IPB and LS Cache.

    Please help me with this if you can:

    Litespeed rule:
    RewriteEngine On
    ###########################################
    # For LiteSpeed public cache (guest user)
    ###########################################
    RewriteCond %{REQUEST_METHOD} ^HEAD|GET$
    RewriteCond %{HTTP_COOKIE} !member_id= [OR]
    RewriteCond %{HTTP_COOKIE} member_id=0
    RewriteCond %{REQUEST_URI} !^/admin
    RewriteCond %{REQUEST_URI} !(css|js|png|gif)$
    RewriteCond %{QUERY_STRING} ^$
    RewriteRule .* – [E=Cache-Control:max-age=360]

    IPB SEO Rule:
    Options -MultiViews
    RewriteEngine On
    RewriteBase /forums/
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /forums/index.php [L]
  2. webizen

    webizen New Member

    You may try the following rules:
    %
    Make sure to put non-cacheable URLs in Do-Not-Cache box.

    Also enable rewrite logging to troubleshoot.
  3. vamman

    vamman New Member

    Thanks. Sorry the same issue occurs. This looks like what I had before.

    Are you suppose to have multiple rewrites? I thought you could combine the rewrite together?
  4. webizen

    webizen New Member

    Yes, you can have multiple rewrites. Usually LS cache rules should be put in front of other rules (that's why no 'L' for the '.* -' one). Please enable rewrite logging to troubleshoot.
  5. mistwang

    mistwang LiteSpeed Staff

    I think you need to find out which URL is causing the trouble.
    Maybe something should not be cached has been cached. and turn cache off for that URL.
    If you can reproduce the problem, you can check it with firebug, or use tcpdump to dump the request/response related at network level.

Share This Page