php headings

Discussion in 'PHP' started by awaken, Aug 14, 2007.

  1. #1
    i've noticed that the company i'm working with, has a large amount of their content in their h1 tags pre-filled with php script. for example: let's say that we have a page dedicated to a particular part number. in order to save time, we automatically insert the part number into an h1 tag via php. this, i assume, doesn't give the SE's any text to read within those tags. all they can see is the php script which means nothing to them, right?
     
    awaken, Aug 14, 2007 IP
  2. Wildhoney

    Wildhoney Active Member

    Messages:
    192
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #2
    End users are unable to see PHP code because it is a server-side language, unlike Javascript. It would appear as simply text to humans and spiders alike who visit the page.
     
    Wildhoney, Aug 14, 2007 IP
  3. awaken

    awaken Guest

    Messages:
    149
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks wildhoney, that answers my question.
     
    awaken, Aug 14, 2007 IP
  4. awaken

    awaken Guest

    Messages:
    149
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    is there a way to make a .php look like a .html to the spiders? i remember someone talking about this a while back, but i can't find it now.
     
    awaken, Aug 14, 2007 IP
  5. ErectADirectory

    ErectADirectory Guest

    Messages:
    656
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #5
    php outputs html which is what spiders read. Nobody, including SE spiders, can read the programming language as it is interpreted and output by your server.
     
    ErectADirectory, Aug 14, 2007 IP
  6. MykeXero

    MykeXero Peon

    Messages:
    25
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    If you mean if you typed in a name.html and it loaded a .php page (But still looked like .html in the url to the browser)

    Then check out this:
    mod_rewrite its an apache module.... its really really useful and does exactly what you need.
     
    MykeXero, Aug 14, 2007 IP
  7. awaken

    awaken Guest

    Messages:
    149
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #7
    that's it! just what i'm looking for.
     
    awaken, Aug 14, 2007 IP