Hello,

2008/2/1, Joshua Slive <[EMAIL PROTECTED]>:
> On Feb 1, 2008 11:18 AM, Zbigniew Szalbot <[EMAIL PROTECTED]> wrote:
> > Hello,
> >
> > It is my first post to this list. I run Apache/2.0.61 on a FreeBSD 6.3
> > server. I would like to be able to set up a simple redirection because
> > I want to offer content in two languages.
> >
> > I read about content negotiation in apache server and saw the example
> > files in the root www directory.
> >
> > I just want to be able to do exactly the same thing as in the example
> > installation but I am not sure why it does not work in my case.
> >
> > I do have
> > AddHandler type-map var
> > in my httpd.conf
> >
> > There is index.html.var in the root folder.
> >
> > It does have:
> >
> > URI: index.html.po.iso8859-2
> > Content-language: pl
> > Content-type: text/html;charset=ISO-8859-2
> >
> > defined in it. And yet while my browser language is PL, the website
> > server does not serve the index.html.po.iso8859-2.
> >
> > What should I check to make it work?
>
> What are you requesting in the browser? You'd need to request
> index.html.var to make that work. You might prefer to use multiviews,
> where you don't need to explicitly specify all the variants. But in
> either case, you need to name all your variants with the proper
> language codes. So if you have an en and pl version, you need
> index.html.en
> and
> index.html.po...
> Then requesting index.html with multiviews on will trigger language 
> negotiation.

Thank you very much Joshua! I haven't realized I need to call
index.html.var. I switched to Mutilviews as it is much better indeed.

I have one more question. Now that it works, I have the following
directory structure for a virtual domain

DocumentRoot /usr/local/www/blog/

blog/
this is where index.html.en and index.html.po are

I would like index.html.po redirect to
blog/pl/

and index.html.en redirect to
blog/en/

I realize I can put refresh in the html files to automatically
redirect to blog/pl/ or blog/en/
Something like http-equiv="REFRESH" content="0;URL=http://domain.tld/blog/en/";

But is there a better way of doing it?

Thank you again!

Zbigniew Szalbot

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to