[pLog-svn] r3777 - in plog/trunk: . class/net

reto at devel.lifetype.net reto at devel.lifetype.net
Mon Jul 24 00:27:27 GMT 2006


Author: reto
Date: 2006-07-24 00:27:26 +0000 (Mon, 24 Jul 2006)
New Revision: 3777

Modified:
   plog/trunk/.htaccess
   plog/trunk/class/net/modrewriterequestgenerator.class.php
Log:
Checked the ModRewriteRequestGenerator settings for paging. It seems to work well for me. Tested on W2K, Apache/1.3.34, PHP Version 5.1.2.

Things changed:
- stricter numbering for pages
- switched from / to . for separators because I liked it more this way :-P

IMPORTANT: The base URL needs to be adjusted if you are not running LifeType in the web root. (like you have to for the error pages). In my case I tested with http://127.0.0.1:4001/lt/ as the url. so my base url is /lt/ and for error documents I use /lt/error.php

Modified: plog/trunk/.htaccess
===================================================================
--- plog/trunk/.htaccess	2006-07-23 15:06:15 UTC (rev 3776)
+++ plog/trunk/.htaccess	2006-07-24 00:27:26 UTC (rev 3777)
@@ -19,26 +19,26 @@
 
 # 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]
+# -- same as above but with paging included
+RewriteRule ^([0-9]+)_[^/]+/archive/([0-9]{6})\.html\.page\.([1-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]
+# -- same as above but with paging included
+RewriteRule ^([0-9]+)_[^/]+/archive/([0-9]{8})\.html\.page\.([1-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]
+# -- same as above but with paging included
+RewriteRule ^([0-9]+)_[^/]+/albums/([0-9]+)_[^.]+\.html\.page\.([1-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]
+# -- same as above but with paging included
+RewriteRule ^([0-9]+)_[^/]+/categories/([0-9]+)_[^.]+\.html\.page\.([1-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]
@@ -60,8 +60,8 @@
 
 # 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]
+# -- same as above but with paging included
+RewriteRule ^([0-9]+)(_[^/]+)\.page\.([1-9]+)$ index.php?blogId=$1&page=$3 [L,NC]
 
 # Static Pages (i.e /3_userfoo/demosites)
 RewriteRule ^([0-9]+)_[^/]+/(.+)$ index.php?op=Template&blogId=$1&show=$2 [NC]

Modified: plog/trunk/class/net/modrewriterequestgenerator.class.php
===================================================================
--- plog/trunk/class/net/modrewriterequestgenerator.class.php	2006-07-23 15:06:15 UTC (rev 3776)
+++ plog/trunk/class/net/modrewriterequestgenerator.class.php	2006-07-24 00:27:26 UTC (rev 3777)
@@ -457,7 +457,7 @@
 				$url = $this->blogLink();
 			}		
 			
-			$pageFormat = "/page/";
+			$pageFormat = ".page.";
 			
 			return( $url.$pageFormat );
 		}
@@ -469,7 +469,7 @@
 		 */
 		function getPageSuffix( $page = "" )
 		{
-			$pageFormat = "/page/".$page;
+			$pageFormat = ".page.".$page;
 			
 			return( $pageFormat );
 		}



More information about the pLog-svn mailing list