Index: trunk/wb/htpage.php
===================================================================
--- trunk/wb/htpage.php	(nonexistent)
+++ trunk/wb/htpage.php	(revision 365)
@@ -0,0 +1,27 @@
+<?php
+
+// Include config file
+require_once('config.php');
+
+// Check if specific page requested
+if(isset($_GET['page'])) {
+	// Page link
+	$page_link = addslashes($_GET['page']);
+	// Query database
+	$sql = "SELECT * FROM pages WHERE link = '/".$page_link."'";
+	$query = $database->query($sql);
+	// Check for errors
+	if($database->is_error()) {
+		// Print error
+		die($database->get_error());
+	} elseif($query->numRows() > 0) {
+		// Get page id
+		$page = $query->fetchRow();
+		$page_id = $page['page_id'];
+		unset($page);
+		// Include main script
+		require_once('index.php');
+	}
+}
+
+?>
\ No newline at end of file

Property changes on: trunk/wb/htpage.php
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: trunk/wb/.htaccess
===================================================================
--- trunk/wb/.htaccess	(nonexistent)
+++ trunk/wb/.htaccess	(revision 365)
@@ -0,0 +1,2 @@
+RewriteEngine on
+RewriteRule ^(.*).html$ htpage.php?page=$1
\ No newline at end of file

Property changes on: trunk/wb/.htaccess
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
