This topic is locked
[SOLVED]

 Using .ht access to create friendly url's and pagination issues

10/21/2009 2:02:24 PM
PHPRunner General questions
N
nicolagrimshaw author

I'm using the following:
RewriteRule ^([^-]*)/accommodation_list.htm$ /search/accommodation_list.php?mastertable=country&masterkey1=$1 [L]
to create seo friendly URL's however many of my lists are long and have more than one page so the pagination does not work properly (apologies to the PHPRunner team, as I though this was a bug with the system for ages!)
For example when visiting http://www.mywebsite.co.uk/italy/accommodation_list.htm the page you actually see http://www.mywebsite.co.uk/search/accommodation_list.php?mastertable=country&masterkey1=Italy
when paging through you are sent to http://www.mywebsite.co.uk/italy/accommodation_list.php?goto=2 which is nonexistant.
This also causes a problem when using the menu etc. and similalry using the same principles on the view page causes a problem with the back button.
Any ideas gratefuly received.
Nicola

N
nicolagrimshaw author 10/24/2009



I'm using the following:
RewriteRule ^([^-]*)/accommodation_list.htm$ /search/accommodation_list.php?mastertable=country&masterkey1=$1 [L]
to create seo friendly URL's however many of my lists are long and have more than one page so the pagination does not work properly (apologies to the PHPRunner team, as I though this was a bug with the system for ages!)
For example when visiting http://www.mywebsite.co.uk/italy/accommodation_list.htm the page you actually see http://www.mywebsite.co.uk/search/accommodation_list.php?mastertable=country&masterkey1=Italy
when paging through you are sent to http://www.mywebsite.co.uk/italy/accommodation_list.php?goto=2 which is nonexistant.
This also causes a problem when using the menu etc. and similalry using the same principles on the view page causes a problem with the back button.
Any ideas gratefuly received.
Nicola



bump

J
Jane 10/28/2009

Nicola,
you can check session variables in the List page: Before display event and redirect to another page if needed:

global $strTableName;

if (!@$_SESSION[$strTableName."_mastertable"] && !@$_SESSION[$strTableName."_masterkey1"])

{

header("Location: accommodation_list.php?mastertable=country&masterkey1=Italy");

exit();

}