Htaccess and Litespeed cache configuration request please help

Discussion in 'LiteSpeed Cache General' started by server4vn, Mar 30, 2011.

  1. server4vn

    server4vn Active Member

    This is my site .htaccess how can i config it to work with Litespeed cache ?

    ErrorDocument 404 /
    ErrorDocument 403 ddos_page.shtml
    #<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteBase /
    #RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/
    #RewriteRule ^(.*)index\.php$ /$1 [R=301,L]
    RewriteRule ^watch?/?([0-9]+)?/?([^/]+).html$ /?act=movie&id=$1 [QSA,L]
    RewriteRule ^watch?/dvd-?([0-9]+)?/?video?/?([0-9]+)?/?([^/]+).html$ /?act=video&id=$1&ep=$2 [QSA,L]
    RewriteRule ^video?/?([0-9]+)?/?([0-9]+)?/?([^/]+).html$ /?act=video&id=$1&ep=$2 [QSA,L]
    RewriteRule ^dvd-detail?/?([0-9]+)?/?([^/]+).html$ /?act=dvd&id=$1 [QSA,L]
    RewriteRule ^categories.html$ /?act=showcat [QSA,L]
    RewriteRule ^categories-([0-9]+)?/?([^/]+).html$ /?act=cat&id=$1 [QSA,L]
    RewriteRule ^categories-([0-9]+)?/?([0-9]+)?/?([^/]+).html$ /?act=cat&id=$1&ep=$2 [QSA,L]
    RewriteRule ^most_recent.html$ /?act=show [L]
    RewriteRule ^most_recent?/?page-([0-9]+).html$ /?act=show&ep=$1 [QSA,L]
    RewriteRule ^top_rate.html$ /?act=showrate [L]
    RewriteRule ^top_rate?/?page-([0-9]+).html$ /?act=showrate&ep=$1 [QSA,L]
    RewriteRule ^most_viewed.html$ /?act=showtop [L]
    RewriteRule ^dating.html$ /?act=dating [L]
    RewriteRule ^information.html$ /?act=information [L]
    RewriteRule ^most_viewed?/?page-([0-9]+).html$ /?act=showtop&ep=$1 [QSA,L]
    RewriteRule ^most_recent?/?page-([0-9]+).html$ /?act=show&ep=$1 [QSA,L]
    RewriteRule ^share?/?([0-9]+) /embed.php?id=$1 [QSA,L]
    RewriteRule ^player3.swf$ /player/3x/player.swf [QSA,L]
    RewriteRule ^player4.swf$ /player/4x/player.swf [QSA,L]
    RewriteRule ^player5.swf$ /player/player.swf [QSA,L]
    RewriteRule ^full-video.html$ /?act=Premium [L]
    RewriteRule ^full-video?/?page-([0-9]+).html$ /?act=Premium&ep=$1 [QSA,L]
    RewriteRule ^rss?/?([^/]+).html$ /rss.php?cat=$1 [QSA,L]
    #</IfModule>
    RewriteEngine on
     
  2. webizen

    webizen Well-Known Member

    insert environment variable "E=cache-control:max-age=120" in the rewrite rules. e.g.
    Where 120 is the cache TTL in second.
     

Share This Page