Jump to content
Larry Ullman's Book Forums

Change Page Title On Sort? [Script 8.6: A Registration Script]

Recommended Posts

Hi Larry,

Google Webmaster tools is flagging this script for making duplicate page titles.  Can you please tell me how best to append/echo the sort order to the page Title in the HTML (switch $link1, $link2, $link3 - lnd, lna, fnd, fna, drd, dra)?



Link to comment
Share on other sites

OK - I got something working (not ideal). Made a new variable:


    $pageTitle = "$_SERVER[REQUEST_URI]";


and then in the title tags


<title>Example <?php echo $pageTitle ; ?></title>


Depending on the sort order, would like to change $pageTitle to echo different text, for example "A-Z" or "Z-A" (instead of /example.php?sort=lnd), but at least this prints unique page titles.

Link to comment
Share on other sites

Hi Larry,

I agree - the sort order shouldn't constitute duplicate pages as there really is no new content being generated, just the same stuff rearranged. However for some reason, Google thinks differently. Maybe because the URL changes slightly, that's all it takes. They can't be sure if it's a new page or not, so they just go with new page?



Edited by bobafifi
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...