SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Nov 2004
    Location
    Westerville
    Posts
    127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    mod rewrite PHP to HTML & headers???

    I have a complicated (sort of) question. If you have PHP pages "rewritten by mod rewrite into html pages, you will have a different header. An example is this:

    pure html page header...

    HTTP/1.1 200 OK
    Date: Wed, 19 Dec 2007 22:40:30 GMT
    Server: Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a PHP-CGI/0.1b
    Last-Modified: Fri, 14 Dec 2007 15:00:49 GMT
    ETag: "54c0ef-44d1-47629aa1"
    Accept-Ranges: bytes
    Content-Length: 17617
    Connection: close
    Content-Type: text/html

    php "rewritten" to html header...

    HTTP/1.1 200 OK
    Date: Wed, 19 Dec 2007 22:39:43 GMT
    Server: Apache/1.3.37 (Unix) mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a PHP-CGI/0.1b
    X-Powered-By: PHP/4.4.7
    Connection: close
    Content-Type: text/html

    As you can see, there is no "Last Modified" , "ETag", "Accept-Ranges" or "Content-Length"... Will this affect SEO in anyway... I would think that the crawlers use the "Last Modified" to obtain the freshness of pages???

    Let me know what you think?

    Thanks in advance!

    Also, headers can be checked here: (I dont own this site)...
    http://webtools.live2support.com/header.php
    Last edited by budhanes; Dec 19, 2007 at 15:44. Reason: Added link

  2. #2
    He's No Good To Me Dead silver trophybronze trophy stymiee's Avatar
    Join Date
    Feb 2003
    Location
    Slave I
    Posts
    23,424
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    That won't affect SEO.

  3. #3
    SitePoint Member
    Join Date
    Dec 2007
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Budhanes,

    I'd really like to know more about that mod. I really need something like that. I've been looking everywhere...

    thanks~
    elle

    If you have PHP pages "rewritten by mod rewrite into html pages,

  4. #4
    SitePoint Zealot
    Join Date
    Nov 2004
    Location
    Westerville
    Posts
    127
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you are on Apache, you can create -or- edit a file called .htaccess

    In that file you could place this text:

    RewriteEngine on
    RewriteBase /
    RewriteRule ^(.*)\.php$ $1.html [R=permanent]

    basically, this will take "*.php" and convert it to *.html".

    So, when you go to "www.mypage.com/thispage.html" Apache will "serve up" a page called "www.mypage.com/thispage.php" and it will appear to be an actual html page instead of a PHP page.

    I use this more for serving up thousands of html pages which are based on only a few PHP pages.

    Ex: On my weather site (still under construction) instead of:

    http://www.mysite.com/index.php?stat...&City=Columbus, I serve up a page called www.mysite.com/columbus_ohio.htm.

    I can speculate more in a PM if you'd like, just want to keep this SEO related due to the forum, and not a mod-rewrite thread.

    You could search this forum, Google or Yahoo on the term "mod rewrite php to html" and get plenty of examples of the Apache Mod Rewrite Engine.


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
  •