SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Member
    Join Date
    Nov 2004
    Location
    sacramento
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Mod Rewrite - Page Titles

    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

  2. #2
    $this->toCD-R(LP); vinyl-junkie's Avatar
    Join Date
    Dec 2003
    Location
    Federal Way, Washington (USA)
    Posts
    1,526
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I wouldn't have www.XXXX.com as part of the page title myself. Visitors know what site they're on, so no need for that in the page title. Instead, do something like this:

    Job Details: Chief Cook & Bottle Washer

    or whatever the actual job title is. Hope it helps.
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more
    Showcase your music collection on the Web

  3. #3
    SitePoint Member
    Join Date
    Nov 2004
    Location
    sacramento
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thats the issue, i dont know how to have a different page title on my each php page that has a different job. I want to have a different page title for each job. Not sure how. Got the extension from php to html but need to have different page titles.

    brick

  4. #4
    $this->toCD-R(LP); vinyl-junkie's Avatar
    Join Date
    Dec 2003
    Location
    Federal Way, Washington (USA)
    Posts
    1,526
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Where are you getting you job title information from? A database or what?
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more
    Showcase your music collection on the Web

  5. #5
    SitePoint Member
    Join Date
    Nov 2004
    Location
    sacramento
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yes, i enter or user enters info that does into a mysql db and posts on the site www.eCUlturalResources.com

  6. #6
    $this->toCD-R(LP); vinyl-junkie's Avatar
    Join Date
    Dec 2003
    Location
    Federal Way, Washington (USA)
    Posts
    1,526
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by brickholius
    yes, i enter or user enters info that does into a mysql db and posts on the site www.eCUlturalResources.com
    OK, so what your PHP script will do is the select the data that you want to display, then wrap the appropriate values in HTML tags.

    I don't know your database structure, but let's say you have a table value called JobTitle that you've selected from your database. This is how you might want to write the web page title portion of your script:

    Code:
    <?php echo "<title>Job Title: {$row['JobTitle']}</title>"; ?>
    Of course, what I've shown here is only a small portion of your PHP script, and there is certainly more than one way to do this. Anyway, I hope this helps.
    Music Around The World - Collecting tips, trade
    and want lists, album reviews, & more
    Showcase your music collection on the Web

  7. #7
    SitePoint Wizard cranial-bore's Avatar
    Join Date
    Jan 2002
    Location
    Australia
    Posts
    2,634
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yep, that's how I do it. Just store my page titles in the database along with the other content and echo it into the <title> tag.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •