PDA

View Full Version : Custom pages - Bug ?!


Holger Veith
12-18-2006, 10:25 PM
i have a look to your Portfolio Websites

Go maybe to http://www.phpground.com/pabout.html

All seems OK, but no try http://www.phpground.com/pabout1.html

or something else like this: http://www.phpground.com/paboukjlkjlkjlkjlkzutzutuztuztzujlkjlkjklkjlkjlkjt .html
http://www.phpground.com/paboukjlfhjgfhgfdshjgNNNNNNNNNNN.html


Why i canīt see the 404 error


My second question: It is possible to put meta tags like keywords or description on these "p" pages. How i can rid off these "p" - mod rewrite to solve this problem with this urls http://www.phpground.com/paboukjlfhjgfhgfdshjgNNNNNNNNNNN.html ... ?

Thanks Holger

John Turner
12-19-2006, 05:41 AM
Hello Holger Veith,

1. open you '../page.php'
***find following code

$page =& $gDirDb->getPageByName($_GET['name']);
$gDirSmarty->assign_by_ref('page', $page);


***replace with following code

$page =& $gDirDb->getPageByName($_GET['name']);

if (!$page)
{
header("Location: {$gDirConfig['base']}{$gDirConfig['dir']}error.php?error=404");
exit;
}
$gDirSmarty->assign_by_ref('page', $page);


*** Save and close it.

It might help.

Simon Gooffin
12-19-2006, 06:04 AM
Hi Holger,
This problem has been fixed in our 2.0 version. Try to make something similar in our demo version and you will get 404 error.

Unfortunately currently there is no way to get rid of p letter before page name. It's used to define we should use page.php file to display the page.