Web Hosting Talk







View Full Version : Mod Rewrite - Page Titles


brickholius
01-29-2005, 01:49 AM
Hello,

I have news and jobs that are posted on my site in php. I used mod rewrite to jobs make them look like /job/433.html. The issue is that each of the pages has the same title which is "Job Detail for www.XXXX.com". Google does not like to see the same page title. How do i deal with this issue of different end address but same page title? I want to have different page titles for each one if possible.

brick

Xenatino
01-29-2005, 10:01 AM
You could either call the name of the job/news at the start of your PHP file and then use something like:

echo "<TITLE>My Job Website - " . $row[jobname] . "</TITLE>";


Or use Javascript to change the title tag later on in the script using:

<script language="Javascript">
document.title = 'My Job Website - <?=$row[jobname];?>';
</script>