Forum Moderators: coopster

Message Too Old, No Replies

Switching site to php

Should I use .html extensions

         

Birdman

4:56 pm on Jan 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hello,

I've recently restructured a site and named all the files with .php extensions, since I'm using includes.

I know I can name them .html and put the addtype thing in the .htaccess. The reason I didn't do it that way from the start, is the beginning of all my pages started with <?xml version="1.0"?>, which was causing a php error. I figured after I get the redirects in place to the restructured site, I could rename all files to .html and parse them as php.

Should I even bother? Is there an advantage to .html pages in the SEs?

Thanks for any input.

Nick_W

4:59 pm on Jan 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No advantage.

The error will be present on your php pages also though, as presumably you are just outputting conditional xhtml right?

print("<?xml version=\"1.0\"?>");

will sort it though...

nick

Birdman

5:01 pm on Jan 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, it's xhtml. I don't even know what version, yet. Still have to go validate.

Do I need that line?

Nick_W

5:10 pm on Jan 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, unless you use a template engine like smarty you'll need to do this. If anyone has another way I'd love to hear it...

Nick

onlineleben

6:21 pm on Jan 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>Is there an advantage to .html pages in the SEs?<

Yes, since your old apges (before converting to php) are probably indexed in the SEs and keeping the names would keep the incoming traffic.
otherwise you would have to setup redirects or rewrites (don#t know exactly) from old to new pagenames.