# Disable MultiViews: we want the real thing # http://httpd.apache.org/docs-2.0/mod/mod_negotiation.html#multiviews Options -MultiViews AddDefaultCharset utf-8 RewriteEngine on # If we have a file or a directory match then lets set the # static variable RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [E=static:1] SetEnvIf Request_URI "/css/" static SetEnvIf Request_URI "/img/" static SetEnvIf Request_URI "/admin/" static SetEnvIf Request_URI "/extlib/" static SetEnvIf Request_URI "/test/" static SetEnvIf Request_URI "/themes/" static SetEnvIf Request_URI "/plugins/" static # You can add other lines here to have static content # under a gregarius installation. #admin section RewriteRule ^admin\/sub\/(.+)$ admin/index.php?domain=feeds&add_channel_to_folder=0&action=Add&new_channel=$1 [L,NE] RewriteRule ^admin\/([a-z]+)$ admin/index.php?view=$1 [L] #opml RewriteRule ^opml.*$ opml.php?act=export [L] #tag view RewriteRule ^tags?\/?$ tags.php?alltags [L,QSA] RewriteRule ^tag\/(.+)$ tags.php?tag=$1 [L,QSA] RewriteRule ^tag\/(.+)\/rss\/?$ tags.php?tag=$1&rss [L,QSA] #state view RewriteRule ^state/(.+)/?$ state.php?state=$1 [L,QSA] #author view RewriteRule ^author/(.+)$ author.php?author=$1 [L,QSA] #date view RewriteCond %{env:static} ^$ RewriteRule ^(20[0-1][0-9])\/([0-9][0-9]?)\/([0-9]?[0-9])\/?$ feed.php?y=$1&m=$2&d=$3 [L,QSA] #item view RewriteCond %{env:static} ^$ RewriteRule ^(.+)\/(20[0-1][0-9])\/([0-9][0-9]?)\/?([0-9]?[0-9])?\/?(.*)?$ feed.php?channel=$1&y=$2&m=$3&d=$4&iid=$5 [L,QSA] #feed view RewriteCond %{env:static} ^$ RewriteRule ^(.+)\/(.*)?$ feed.php?channel=$1&iid=$2 [L,QSA] #feed view - without the trailing slash RewriteCond %{env:static} ^$ RewriteRule ^(.+)\/?$ feed.php?channel=$1 [L,QSA]