| 1 | |
|---|
| 2 | # Disable MultiViews: we want the real thing |
|---|
| 3 | # http://httpd.apache.org/docs-2.0/mod/mod_negotiation.html#multiviews |
|---|
| 4 | |
|---|
| 5 | Options -MultiViews |
|---|
| 6 | AddDefaultCharset utf-8 |
|---|
| 7 | |
|---|
| 8 | <IfModule mod_rewrite.c> |
|---|
| 9 | RewriteEngine on |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | # If we have a file or a directory match then lets set the |
|---|
| 14 | # static variable |
|---|
| 15 | RewriteCond %{REQUEST_FILENAME} -f [OR] |
|---|
| 16 | RewriteCond %{REQUEST_FILENAME} -d |
|---|
| 17 | RewriteRule ^.*$ - [E=static:1] |
|---|
| 18 | |
|---|
| 19 | SetEnvIf Request_URI "/css/" static |
|---|
| 20 | SetEnvIf Request_URI "/img/" static |
|---|
| 21 | SetEnvIf Request_URI "/admin/" static |
|---|
| 22 | SetEnvIf Request_URI "/extlib/" static |
|---|
| 23 | SetEnvIf Request_URI "/test/" static |
|---|
| 24 | SetEnvIf Request_URI "/themes/" static |
|---|
| 25 | SetEnvIf Request_URI "/plugins/" static |
|---|
| 26 | # You can add other lines here to have static content |
|---|
| 27 | # under a gregarius installation. |
|---|
| 28 | |
|---|
| 29 | #admin section |
|---|
| 30 | RewriteRule ^admin\/sub\/(.+)$ admin/index.php?domain=feeds&add_channel_to_folder=0&action=Add&new_channel=$1 [L,NE] |
|---|
| 31 | RewriteRule ^admin\/([a-z]+)$ admin/index.php?view=$1 [L] |
|---|
| 32 | |
|---|
| 33 | #opml |
|---|
| 34 | RewriteRule ^opml.*$ opml.php?act=export [L] |
|---|
| 35 | |
|---|
| 36 | #tag view |
|---|
| 37 | RewriteRule ^tags?\/?$ tags.php?alltags [L,QSA] |
|---|
| 38 | RewriteRule ^tag\/(.+)$ tags.php?tag=$1 [L,QSA] |
|---|
| 39 | RewriteRule ^tag\/(.+)\/rss\/?$ tags.php?tag=$1&rss [L,QSA] |
|---|
| 40 | |
|---|
| 41 | #state view |
|---|
| 42 | RewriteRule ^state/(.+)/?$ state.php?state=$1 [L,QSA] |
|---|
| 43 | |
|---|
| 44 | #author view |
|---|
| 45 | RewriteRule ^author/(.+)$ author.php?author=$1 [L,QSA] |
|---|
| 46 | |
|---|
| 47 | #date view |
|---|
| 48 | RewriteCond %{env:static} ^$ |
|---|
| 49 | RewriteRule ^(20[0-1][0-9])\/([0-9][0-9]?)\/([0-9]?[0-9])\/?$ feed.php?y=$1&m=$2&d=$3 [L,QSA] |
|---|
| 50 | |
|---|
| 51 | #item view |
|---|
| 52 | RewriteCond %{env:static} ^$ |
|---|
| 53 | 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] |
|---|
| 54 | |
|---|
| 55 | #feed view |
|---|
| 56 | RewriteCond %{env:static} ^$ |
|---|
| 57 | RewriteRule ^(.+)\/(.*)?$ feed.php?channel=$1&iid=$2 [L,QSA] |
|---|
| 58 | |
|---|
| 59 | #feed view - without the trailing slash |
|---|
| 60 | RewriteCond %{env:static} ^$ |
|---|
| 61 | RewriteRule ^(.+)\/?$ feed.php?channel=$1 [L,QSA] |
|---|
| 62 | </IfModule> |
|---|