Topic: XHTML and Rails

Hi,

I'm trying to display my website on xhtml. I've in my application view this

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="application/ce-html+xml; charset=UTF-8"/>

but my browser is still thinking that it's a html file because of the extention.

In fact, if I try my simple file in a browser with the xhtml extension it works but not with the html extension.

So what can I do to configure rails now?

Thanks

Re: XHTML and Rails

What exactly are you trying to accomplish?

The browser is supposed to only interpret *HTML and JavaScript using the .html or .htm file extensions. You must use .erb, or .rhtml. Just like with PHP, you use .php, .php3, .php4, .php5, .phtml, etc...

And really, outside of the scope of client side languages, the server interprets everything. So when you are writing your pages, and you give the .erb or .rhtml extensions, you're telling that web server to intrepret this Ruby code through MIME types configured through the server.

All you have above is just the standard W3C XHTML Transitional DTD, so there's nothing to do with that anyway, it's just there. There's not even any <head>, or <body> tags there....