![]() |
| Home | Demo | Services | Features | Help | User Forum | Blog | About | |
|
#1
|
|||
|
|||
|
I am in the process of re-writing one of my sites in XHTML 1.1. I want to serve it properly as xhtml+xml to the agents that understand, and am therefore changing all my page extensions to .xhtml. I'm going to use a mod rewrite in the .htaccess to serve text/html to IE.
My question is: will the main search engines have any issues with the extension change ( assuming I keep the actual page names the same) as far as indexing/page rank etc. are concerned? Also if any of you guys have experience of serving xhtml "properly" across browsers, is mod rewrite a sensible way to go for Apache? I've read about using php headers, but this somehow seems "cleaner" |
|
#2
|
|||
|
|||
|
don't know if this helps but my site is all xhtml 1.0 transitional and all code is valid and displays as intended across browsers but all files are as .htm extensions apart from the index page which is .html extension
__________________
|
|
#3
|
||||
|
||||
|
It doesn't matter what the extension is, only what the content is served as.
IE cannot handle XHTML 1.1. If you want to manage that in .htaccess keep in mind it has to be set conditionally based on the browser. I'd rather do it by php script directly at the top of the page itself and generate the doctype and content type and whatnot that way, based on user agent. Never mind that I am clueless on the specifics anyway
__________________
Christina >>Forum Moderator<< Please do not PM me for support. The forum is here for that. |
|
#4
|
|||
|
|||
|
Quote:
If that's the case then I'd better stick with 1.0 and save myself the potential problem of losing ranking. I could always validate as 1.1 and just serve as text/html (as most sites do), keeping the html extension. Probably just trying to be too clever |
|
#5
|
||||
|
||||
|
The robot is not a browser. It's not like it will see it sometimes one way and other times another way.
In any case the code needs to be valid for the doctype used. Beyond that the robot parses to get the content. The markup doesn't count as content as long as it's valid and doesn't get scrambled up as content.
__________________
Christina >>Forum Moderator<< Please do not PM me for support. The forum is here for that. |
|
#6
|
|||
|
|||
|
Thanks Chris.
It's only a static site so I don't really "need" to make use of xml advantages, but it's nice to know that if I did change my page names to .xhtml filenames, it wouldn't be an issue |
|
#7
|
||||
|
||||
|
Changing the file name (even if just the extension) will be ok as long as you also implement 301 redirections from old to new.
__________________
Christina >>Forum Moderator<< Please do not PM me for support. The forum is here for that. |
|
#8
|
|||
|
|||
|
Christina, are you saying that if you replace say a page named index.html with index.xhtml or index.php you should implement 301 redirections from old to new?
__________________
DonEc ![]() Links and accurate information provide the best answer, while garbage in provides garbage out. |
|
#9
|
|||
|
|||
|
From time to time over the past several years I have served my Home page as XHTML 1.0 with Content-Type text/html to IE Browsers and with Content-Type application/xhtml+xml to Browsers that recognize that content type -- via Content Negotiation.
My current Home Page is served in this manner. I compose the great majority of my pages using HTML 4.01 Markup (a few using ISO-HTML) and they are naturally served as text/html. I actually started using Content Negotiation for XHTML documents as an experiment to see how the concept worked in practice -- I continue to do so mainly just for fun -- I am growing old and need some diversions from serious work! I also employ Content Negotiation for -- my XHTML+RDFa test page -- there is no "Appendix C" provision (ala XHTML 1.0) in the W3C RDFa in XHTML Syntax and Processing document -- if XHTML+RDFa documents are served as text/html the W3C Validator adds the following generic note to the successful validation report (quote): "Warning Conflict between Mime Type and Document Type The document is being served with the text/html Mime Type which is not a registered media type for the XHTML + RDFa Document Type. The recommended media type for this document is: application/xhtml+xml" I note that the W3C is currently serving some of their XHTML+RDFa documents as Content-Type text/html. James
__________________
Web Authoring References & Resources Validated (X)HTML (Strict) - CSS - RDF/XML Portal to all of my Web Sites and Pages |
|
#10
|
|||
|
|||
|
I don't really want to have to implement redirects - I'd rather just create valid XHTML 1.1 and serve it as text/html for the time being, converting to application/xhtml+xml at some point in the future.
It would be satisfying to serve application/xhtml+xml to the relevant browsers (everything except IE, it seems) via Content Negotiation. I have got this working with a .htaccess mod-rewrite and it all validates in WC3 with no MIME warning, but it obviously requires an xhtml file extension to achieve this. Am I right in this thinking?
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|