[pLog-svn] r3761 - plog/trunk

Oscar Renalias oscar at renalias.net
Thu Jul 20 21:23:42 GMT 2006


Since I'm no expert in mod_rewrite, would anyone with more experience  
mind taking a look at these?

They seem to work fine, except that I had to prefix every rule with  
"/" (so that "^([0-9]+)(_[^/]+)?$ index.php?blogId=$1 [L,NC]" becomes  
"/^([0-9]+)(_[^/]+)?$ index.php?blogId=$1 [L,NC]") to get them to  
work in my machine, but I did not dare commit that change because the  
previous version did not have this forward slash character at the  
beginning of it. Does anyone know why?

On 20 Jul 2006, at 23:45, oscar at devel.lifetype.net wrote:

> Author: oscar
> Date: 2006-07-20 20:45:34 +0000 (Thu, 20 Jul 2006)
> New Revision: 3761
>
> Modified:
>    plog/trunk/.htaccess
> Log:
> added a few rewrite rules so that mod_rewrite can parse paged URLs  
> properly
>
>
> Modified: plog/trunk/.htaccess
> ===================================================================
> --- plog/trunk/.htaccess	2006-07-20 20:22:31 UTC (rev 3760)
> +++ plog/trunk/.htaccess	2006-07-20 20:45:34 UTC (rev 3761)
> @@ -10,26 +10,35 @@
>  Options +FollowSymLinks
>
>  <IfModule mod_rewrite.c>
> +
>  RewriteEngine On
>  RewriteBase /
>
>  # Permalink to the blog entry (i.e. /1_userfoo/archive/3_title-foo- 
> bar.html)
>  RewriteRule ^([0-9]+)_[^/]+/archive/([0-9]+)_[^.]+\.html$  
> index.php?op=ViewArticle&blogId=$1&articleId=$2 [L,NC]
>
> -# Monthly archive (i.e. /1_userfoo/archive/200401.html)
> +# Monthly archive (i.e. /1_userfoo/archive/200401.html)
>  RewriteRule ^([0-9]+)_[^/]+/archive/([0-9]{6})\.html$ index.php? 
> blogId=$1&Date=$2 [L,NC]
> +# Monthly archive (i.e. /1_userfoo/archive/200401.html) -- same as  
> above but with paging included
> +RewriteRule ^([0-9]+)_[^/]+/archive/([0-9]{6})\.html/page/([0-9]+) 
> $ index.php?blogId=$1&Date=$2&page=$3 [L,NC]
>
>  # Daily archive (i.e. /1_blogfoo/archive/20040101.html)
>  RewriteRule ^([0-9]+)_[^/]+/archive/([0-9]{8})\.html$ index.php? 
> blogId=$1&Date=$2 [L,NC]
> +# Daily archive (i.e. /1_blogfoo/archive/20040101.html) -- same as  
> above but with paging included
> +RewriteRule ^([0-9]+)_[^/]+/archive/([0-9]{8})\.html/page/([0-9]+) 
> $ index.php?blogId=$1&Date=$2&page=$3 [L,NC]
>
>  # Album (i.e. /88_userfoo/albums/34_title-foo-bar.html)
>  RewriteRule ^([0-9]+)_[^/]+/albums/([0-9]+)_[^.]+\.html$ index.php? 
> op=ViewAlbum&blogId=$1&albumId=$2 [L,NC]
> +# Album (i.e. /88_userfoo/albums/34_title-foo-bar.html) -- same as  
> above but with paging included
> +RewriteRule ^([0-9]+)_[^/]+/albums/([0-9]+)_[^.]+\.html/page/([0-9] 
> +)$ index.php?op=ViewAlbum&blogId=$1&albumId=$2&page=$3 [L,NC]
>
>  # Albums (i.e. /88_userfoo/albums/)
>  RewriteRule ^([0-9]+)_[^/]+/albums/$ index.php?op=ViewAlbum&blogId= 
> $1&albumId=0 [L,NC]
>
>  # Category view (i.e. /88_userfoo/categories/4_cat-foobar.html)
>  RewriteRule ^([0-9]+)_[^/]+/categories/([0-9]+)_[^.]+\.html$  
> index.php?blogId=$1&postCategoryId=$2 [L,NC]
> +# Category view (i.e. /88_userfoo/categories/4_cat-foobar.html) --  
> same as above but with paging included
> +RewriteRule ^([0-9]+)_[^/]+/categories/([0-9]+)_[^.]+\.html/page/ 
> ([0-9]+)$ index.php?blogId=$1&postCategoryId=$2&page=$3 [L,NC]
>
>  # Category-Feeds (i.e. /3_userfoo/feeds/categories/2_category/atom)
>  RewriteRule ^([0-9]+)_[^/]+/feeds/categories/([0-9]+)_[^.]+/(.*)$  
> rss.php?blogId=$1&categoryId=$2&profile=$3 [L,NC]
> @@ -49,14 +58,13 @@
>  # Download a resource (i.e. /88_userfoo/get/this-is-a-resource- 
> name.pdf)
>  RewriteRule ^([0-9]+)_[^/]+/get/(.+)$ resserver.php?blogId= 
> $1&resource=$2 [L,NC]
>
> -# Static Pages (i.e /3_userfoo/demosites)
> -RewriteRule ^([0-9]+)_[^/]+/(.+)$ index.php?op=Template&blogId= 
> $1&show=$2 [NC]
> -
>  # A non-default blog (i.e. /88_userfoo)
>  RewriteRule ^([0-9]+)(_[^/]+)?$ index.php?blogId=$1 [L,NC]
> +# A non-default blog (i.e. /88_userfoo) -- same as above but with  
> paging included
> +RewriteRule ^([0-9]+)(_[^/]+)/page/([0-9]+)$ index.php?blogId= 
> $1&page=$3 [L,NC]
>
> -# Daily archive (i.e. /1_userfoo/archive/20040101.html)
> -RewriteRule ^([0-9]+)_[^/]+/archive/([0-9]{8})\.html$ index.php? 
> blogId=$1&Date=$2 [L,NC]
> +# Static Pages (i.e /3_userfoo/demosites)
> +RewriteRule ^([0-9]+)_[^/]+/(.+)$ index.php?op=Template&blogId= 
> $1&show=$2 [NC]
>
>  </IfModule>
>
>
> _______________________________________________
> pLog-svn mailing list
> pLog-svn at devel.lifetype.net
> http://devel.lifetype.net/mailman/listinfo/plog-svn
>



More information about the pLog-svn mailing list