DNforum.com - Domain Sales, Domain Forum, Domain Appraisals
 
Register Now! Welcome to Dnforum.com You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast and simple so please, join our community today! If you have any problems with the registration process or your account login, please contact us.
Go Back   DNForum - Domain Sales, Domain Forum, Domain Appraisals, Domain Registrars > Content Development > Website Development and Design Discussion > Coding/Programming/Languages
Reply
 
LinkBack Thread Tools Display Modes
Old 07-24-2007, 05:29 AM   #1 (permalink)
Platinum Lifetime Member
 
Name: Ben
Last Online: Today 05:13 AM
iTrader: (13)
Join Date: Jan 2007
Posts: 632
DNF$: 0
Location: UK
Country:


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
__________________
bensd is online now   Reply With Quote
Old 07-24-2007, 06:15 AM   #2 (permalink)
[On holiday]
 
tristanperry's Avatar
 
Name: Tristan
Last Online: Today 04:29 AM
iTrader: (42)
Join Date: Jan 2007
Posts: 1,118
DNF$: 3,338
Location: Wales, UK
Country:


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 )
__________________
The Legion Host - quality hosting at low prices

On holiday from 28th June - 7th July
tristanperry is online now   Reply With Quote
Old 07-26-2007, 11:13 AM   #3 (permalink)
Gold Lifetime Member
 
Last Online: 09-14-2007 02:50 AM
iTrader: (1)
Join Date: Jul 2007
Posts: 23
DNF$: 100
Location: Australia
Country:


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.
Japh is offline   Reply With Quote
Old 07-26-2007, 11:22 AM   #4 (permalink)
Gold Lifetime Member
 
Last Online: 09-14-2007 02:50 AM
iTrader: (1)
Join Date: Jul 2007
Posts: 23
DNF$: 100
Location: Australia
Country:


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.
Japh is offline   Reply With Quote
Old 07-26-2007, 11:23 AM   #5 (permalink)
Gold Lifetime Member
 
Last Online: 09-14-2007 02:50 AM
iTrader: (1)
Join Date: Jul 2007
Posts: 23
DNF$: 100
Location: Australia
Country:


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
Japh is offline   Reply With Quote
Old 07-26-2007, 12:28 PM   #6 (permalink)
Platinum Lifetime Member
 
Name: Ben
Last Online: Today 05:13 AM
iTrader: (13)
Join Date: Jan 2007
Posts: 632
DNF$: 0
Location: UK
Country:


Re: XHTML vs. PHP

Thankyou both for your help
__________________
bensd is online now   Reply With Quote
Old 07-26-2007, 04:46 PM   #7 (permalink)
Gold Lifetime Member
 
chickenhawk's Avatar
 
Last Online: 05-28-2008 12:43 AM
iTrader: (9)
Join Date: Jun 2007
Posts: 40
DNF$: 175
Location: Mass
Country:


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.
chickenhawk is offline   Reply With Quote
Old 07-26-2007, 09:22 PM   #8 (permalink)
Pakistaniā„¢
 
Ehsan's Avatar
 
Name: Ehsan Ahmad Rehan
Last Online: Yesterday 03:53 PM
iTrader: (12)
Join Date: Aug 2006
Posts: 1,123
DNF$: 24
Location: PAKISTAN
Country:


Re: XHTML vs. PHP

Nice trick Chickenhawk , i will try it out
__________________
Ehsan Ahmad Rehan

Ehsan is offline   Reply With Quote
Old 01-01-2008, 07:35 AM   #9 (permalink)
Platinum Lifetime Member
 
Last Online: 07-18-2008 04:53 AM
iTrader: (2)
Join Date: Dec 2007
Posts: 156
DNF$: 830
Location: UK
Country:


re: meta redirect, why not just add this in .htaccess:

DirectoryIndex index.php
sunja is offline   Reply With Quote
Old 01-05-2008, 09:52 PM   #10 (permalink)
DNF Member
 
grace5's Avatar
 
Last Online: 07-19-2008 01:06 PM
iTrader: (13)
Join Date: May 2005
Posts: 244
DNF$: 528
Location: USA


Quote:
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
grace5 is offline   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need experienced PHP / MySQL / Ajax CMS coder, Tableless xHTML / CSS template coder! Nica09 Help Wanted! 0 08-05-2006 09:34 PM
14 Super PHP scripts, Ringtone site, and Photorating website! NavySeals91 DNF$ Sales/Domain Auctions 21 07-06-2006 08:09 PM
Scripts 2 Sell Package on Auction ForumsHelp DNF$ Sales/Domain Auctions 15 08-17-2005 12:00 PM
Beware of PHP! (& other ones :P ) PolurNET.com Humor 13 11-13-2004 08:07 PM
a nice one: mysqlphp.com Domain Name Appraisal Discussion 2 04-27-2002 05:29 PM


All times are GMT -4. The time now is 05:19 AM.
Copyright @2001-2008 DNForum.com

Learn Domains
Promote Domains
Research Domains
Buy Domains
Resell Domains
Park Domains
Sell Domains
Build Domains
Host Domains
Trademark Domains
Domain Domains
manage Domains
Appraise Domains