[opencms-dev] where is "create sibling"
] Code Create [
ocms at code-create.de
Fri Feb 27 16:09:07 CET 2015
Hi Christoph,
why do you do the redirect at all?
You're already differentiating by TLD.
Why not just rewrite internally to your /de/ and /en/ folders via Apache?
Kind regards, Bernd
Am 27.02.2015 um 16:00 schrieb Christoph Kukulies:
> Am 27.02.2015 um 13:10 schrieb Tobias Karrer:
>> Hi Christoph,
>>
>> simply switching to vfs and copy your index.html to "index.htm" checking
>> "Create a sibling of the resource" don't work?
>> Or create a htmlredirect from index.htm -> index.html?
>
> Thanks Tobias. My memory. I could have sworn I used the sibling mechanism
> already in the 9.5.0 workplace but and in fact, when I saw the copy options the
> scales fell from my eyes. ;)
>
> SEO (Search Engine Optimization). OK. Should I do the permanent redirect in the
> apache host configuration ? Or is there a way to do this in a jsp (bean?)
>
>
>>
>> Best,
>> Tobias
>>
>> PS: Keep in mind that response.sendRedirect() does a temporary redirect. So in
>> case SEO is important, better use a permanent redirect.
>>
>> Am 27.02.2015 um 11:53 schrieb Christoph Kukulies:
>>> In my new, OpenCms 9.5.0 based site, it happened that I had to change the
>>> central index.htm, which had a template attached to, containing the following
>>> code:
>>>
>>> <%@page import="org.opencms.jsp.*,org.opencms.file.*,java.util.*" %>
>>> <%
>>> CmsJspActionElement cms = new CmsJspActionElement(pageContext, request,
>>> response);
>>>
>>> String serverName = request.getServerName();
>>>
>>> if (serverName.indexOf(".com") != -1) {
>>> response.sendRedirect(cms.link("/en/"));
>>> } else {
>>> response.sendRedirect(cms.link("/de/"));
>>> }
>>> %>
>>>
>>> to take into account that our site had a .de and a .com ending. Now the
>>> index.html is actually
>>> of type "jsp", but named index.html.
>>>
>>> Unfortunately my colleagues in the office had hard wired links on their desktops
>>> containing the URL http://oursite.de/index.htm
>>>
>>> So what can I do now? I'm missing the "Create sibling" in the Add wizard
>>> under 9.5.0. Am I just blind?
>>>
>>> --
>>> Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de
>>>
>
> --
> Chris Christoph P. U. Kukulies kukulies (at) rwth-aachen.de
>
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://lists.opencms.org/cgi-bin/mailman/listinfo/opencms-dev
>
>
>
More information about the opencms-dev
mailing list