Changeset 1727 for trunk

Show
Ignore:
Timestamp:
06/08/07 19:57:58 (18 months ago)
Author:
cfriesen
Message:

Some mod-rewrite rewriting. Someone scream if I forgot somewhere.

Location:
trunk/gregarius
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • trunk/gregarius/.htaccess

    r1692 r1727  
    4343 
    4444  #author view 
    45   RewriteRule ^author/(.+)$ author.php?author=$1 [L,QSA] 
     45  RewriteRule    ^author/(.+)$ author.php?author=$1 [L,QSA] 
    4646 
    4747  #date view 
    4848  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] 
     49  RewriteRule    ^date/(20[0-1][0-9])/([0-9][0-9]?)/([0-9]?[0-9])/?$ feed.php?y=$1&m=$2&d=$3 [L,QSA] 
    5050 
    5151  #item view 
    5252  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] 
     53  RewriteRule  ^item/(.+)/(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] 
    5454   
    5555  #feed view 
    5656  RewriteCond  %{env:static} ^$ 
    57   RewriteRule ^(.+)/(.*)?$   feed.php?channel=$1&iid=$2 [L,QSA] 
     57  RewriteRule    ^feed/(.+)/(.*)?$   feed.php?channel=$1&iid=$2 [L,QSA] 
    5858 
    5959  #feed view - without the trailing slash 
    6060  RewriteCond  %{env:static} ^$ 
    61   RewriteRule ^(.+)/?$   feed.php?channel=$1 [L,QSA] 
     61  RewriteRule    ^feed/(.+)/?$   feed.php?channel=$1 [L,QSA] 
     62 
     63  #folder view 
     64    RewriteCond  %{env:static} ^$ 
     65    RewriteRule  ^folder/(.+)/(.*)?$        feed.php?channel=$1 [L,QSA] 
    6266</IfModule> 
    6367 
  • trunk/gregarius/cls/channels.php

    r1668 r1727  
    8888 
    8989        if (getConfig('rss.output.usemodrewrite')) { 
    90             $this->rlink = getPath(rss_uri($title)) . "/"; 
     90            $this->rlink = getPath("/feed/".rss_uri($title)) . "/"; 
    9191        } else { 
    9292            $this->rlink = getPath()."feed.php?channel=$id"; 
     
    137137     
    138138    function makeFolderUrl($fn) { 
    139         return getPath( 
     139        return getPath("folder/". 
    140140            preg_replace('#\s#','_',sanitize($fn,RSS_SANITIZER_URL)) 
    141141        ) .'/'; 
  • trunk/gregarius/cls/wrappers/feed.php

    r1181 r1727  
    8484     
    8585    if (getConfig('rss.output.usemodrewrite')) { 
    86         return getPath().$GLOBALS['rss']->currentFeed->escapedTitle ."/"; 
     86        return getPath()."/feed/".$GLOBALS['rss']->currentFeed->escapedTitle ."/"; 
    8787    }  
    8888    return getPath()."feed.php?channel=".$GLOBALS['rss']->currentFeed->cid ; 
  • trunk/gregarius/cls/wrappers/item.php

    r1625 r1727  
    5757    if ($GLOBALS['rss'] -> currentItem ->escapedTitle != "" && getConfig('rss.output.usemodrewrite')) { 
    5858        return getPath() 
    59             .$GLOBALS['rss'] -> currentItem -> parent->escapedTitle 
     59            ."/item/".$GLOBALS['rss'] -> currentItem -> parent->escapedTitle 
    6060            ."/$ply/$plm/$pld/" 
    6161            .$GLOBALS['rss'] -> currentItem -> escapedTitle; 
  • trunk/gregarius/themes/lilina/web/item.php

    r1711 r1727  
    77        $thisDay = rss_locale_date("%d", $GLOBALS['rss']->currentItem->date);  
    88        if(getConfig('rss.output.usemodrewrite')) { 
    9             $dateURL =  getPath() . "$thisYear/$thisMon/$thisDay/"; 
     9            $dateURL =  getPath() . "date/$thisYear/$thisMon/$thisDay/"; 
    1010        }else{ 
    1111            $dateURL = getPath() . "feed.php?y=$thisYear&m=$thisMon&d=$thisDay"; 
  • trunk/gregarius/util.php

    r1691 r1727  
    666666    if (getConfig('rss.output.usemodrewrite')) { 
    667667        if ($channel) { 
    668             $ret .= "$channel/"; 
     668            $ret .= "item/$channel/"; 
    669669        } 
    670670        $ret .= rss_date(($dayView ? 'Y/m/d/' : 'Y/m/'), $ts, false);