Welcome to Welcome to DNF.com™ - Domain Sales, Domain Forum, Domain Appraisals, Domain Registrars

If you are new to domains and looking to buy, sell and learn about domains then you have come to the right place. DNForum is the largest domain name community on the internet and continues to grow every day. There are over 105,000 domainers on DNForum doing everything from buying domains, selling domains, learning about domains and discussing domains. Take a minute and Register.

Register Today on DNForum IT'S FREE!

Results 1 to 10 of 10

Thread: XHTML vs. PHP

  1. #1
    Platinum Lifetime Member

    Join Date
    Jan 2007
    Location
    UK
    Posts
    811
    DNF$
    246
    Bank
    0
    Total DNF$
    246
    Donate  

    XHTML vs. PHP

    I am in the process of building a fairly simple site, but will still have between 100-150 pages.

    I have started to build it, but a few times i have decided to make changes to my header or footer. When working with XHTML this meant that i had to go through each page and manually change the code. If i decided to code the website in PHP i can use the include() statment for my headers and footers.

    Apart from my contact page, the include() statement is the only PHP used throughout the whole website.

    1. Is it frowned upon that i am mainly writing in XHTML but the website is in PHP?

    2. Do the search engine treat PHP pages any differently?

    3. When the webite goes live i was going to use a <meta> redirect to index.php - is this the correct thing to do?

    Thanks for any help in advance

  2. #2
    Amms.com
    tristanperry's Avatar
    Join Date
    Jan 2007
    Location
    Wales, UK
    Posts
    1,675
    DNF$
    959
    Bank
    0
    Total DNF$
    959
    Donate  

    Re: XHTML vs. PHP

    1) Absolutely not There's nothing wrong with having a .html or .php page. Just to clear a few things up, actually. The website would still be in XHTML, nobody could tell differently. PHP, however, would be in the background to generate some of that XHTML (via the include(); statement) - there's nothing wrong with this.

    Heck, who knows. In today's dynamic web, maybe the search engines would prefer the use of PHP, Perl (etc). Although one thing's for certain - it's not frowned upon.

    2) Nope - unless you are passing a lot of data through a URL. For example "index.php?page=contact&section=example". Although that doesn't seem to be the case, so ignore that observation

    3) How do you mean? Why would you need a meta redirect to index.php? Just have index.php as the only index.ext file, and people will automatically be served with the index.php page. What I mean by that is that if you have index.html, delete it and just have index.php - that way, people will go to index.php anyway.

    Using a <meta> redirect would be a very bad thing to do - it'd block out the search engine bots (as they'd come to a page, and get redirected; not good).

    Thanks,
    Tristan

    P.S. PM me if you have any further questions - I may not actively check this thread (I have too many bookmarks at the moment )

  3. #3
    Gold Lifetime Member

    Join Date
    Jul 2007
    Location
    Australia
    Posts
    23
    DNF$
    239
    Bank
    0
    Total DNF$
    239
    Donate  

    Re: XHTML vs. PHP

    I agree with what Tristan said, but just wanted to add one little thing.

    If you delete your index.html/index.htm/default.htm (whatever) file, and just have your index.php, that should work (as Tristan said) depending on your host. If for some reason it doesn't work, rather than try an alternate method, you should contact your host and get them to change the server's settings so that it does work. An immediate redirection would penalise you on search engines.

  4. #4
    Gold Lifetime Member

    Join Date
    Jul 2007
    Location
    Australia
    Posts
    23
    DNF$
    239
    Bank
    0
    Total DNF$
    239
    Donate  

    Re: XHTML vs. PHP

    I agree with what Tristan said, but just wanted to add one little thing.

    If you delete your index.html/index.htm/default.htm (whatever) file, and just have your index.php, that should work (as Tristan said) depending on your host. If for some reason it doesn't work, rather than try an alternate method, you should contact your host and get them to change the server's settings so that it does work. An immediate redirection would penalise you on search engines.

  5. #5
    Gold Lifetime Member

    Join Date
    Jul 2007
    Location
    Australia
    Posts
    23
    DNF$
    239
    Bank
    0
    Total DNF$
    239
    Donate  

    Re: XHTML vs. PHP

    I agree with what Tristan said, but just wanted to add one little thing.

    If you delete your index.html/index.htm/default.htm (whatever) file, and just have your index.php, that should work (as Tristan said) depending on your host. If for some reason it doesn't work, rather than try an alternate method, you should contact your host and get them to change the server's settings so that it does work. An immediate redirection would penalise you on search engines.

    Help! I've lost control of my computer and it posted 3 times!! (How do I delete??)
    Last edited by Japh; 07-26-2007 at 11:30 AM. Reason: Automerged Doublepost

  6. #6
    Platinum Lifetime Member

    Join Date
    Jan 2007
    Location
    UK
    Posts
    811
    DNF$
    246
    Bank
    0
    Total DNF$
    246
    Donate  

    Re: XHTML vs. PHP

    Thankyou both for your help

  7. #7
    Platinum Lifetime Member
    chickenhawk's Avatar
    Join Date
    Jun 2007
    Location
    Mass
    Posts
    41
    DNF$
    199
    Bank
    0
    Total DNF$
    199
    Donate  

    Re: XHTML vs. PHP

    you can rename index.php to index.html if you add the following to .htaccess

    <Files *.html>
    ForceType application/x-httpd-php
    </Files>

    So it looks like plain html to everyone (even google), but you have php under the hood.

  8. #8
    Pakistani™
    Ehsan's Avatar
    Join Date
    Aug 2006
    Location
    P A K I S T A N
    Posts
    1,376
    DNF$
    41,349
    Bank
    0
    Total DNF$
    41,349
    Donate  

    Re: XHTML vs. PHP

    Nice trick Chickenhawk , i will try it out

  9. #9
    Platinum Lifetime Member

    Join Date
    Dec 2007
    Location
    UK
    Posts
    225
    DNF$
    1,399
    Bank
    0
    Total DNF$
    1,399
    Donate  
    re: meta redirect, why not just add this in .htaccess:

    DirectoryIndex index.php

  10. #10
    DNF Member
    grace5's Avatar
    Join Date
    May 2005
    Location
    USA
    Posts
    430
    DNF$
    1,001
    Bank
    0
    Total DNF$
    1,001
    Donate  
    you can rename index.php to index.html if you add the following to .htaccess

    <Files *.html>
    ForceType application/x-httpd-php
    </Files>
    most servers will pick up the index.php if the index.html is not present(cpanel servers do for sure) it really not a big deal.If you host server doesn't ask them to add that to the config file for you.

    BTW
    Xhtml is the way to go
    FREE Beta of Instant Article Wizard 3 Fully Functioning version |
    | ***Build 1 way Backlinks Great service

Similar Threads

  1. Replies: 0
    Last Post: 08-05-2006, 09:34 PM
  2. 14 Super PHP scripts, Ringtone site, and Photorating website!
    By NavySeals91 in forum DNF$ Sales/Domain Auctions
    Replies: 21
    Last Post: 07-06-2006, 08:09 PM
  3. Scripts 2 Sell Package on Auction
    By ForumsHelp in forum DNF$ Sales/Domain Auctions
    Replies: 15
    Last Post: 08-17-2005, 12:00 PM
  4. Beware of PHP! (& other ones :P )
    By PolurNET.com in forum Humor
    Replies: 13
    Last Post: 11-13-2004, 08:07 PM
  5. a nice one: mysqlphp.com
    By in forum Domain Name Appraisal Discussion
    Replies: 2
    Last Post: 04-27-2002, 05:29 PM

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
  •  

Domain name forum recommended by Domaining.com