301 redirect

View: New views
4 Messages — Rating Filter:   Alert me  

301 redirect

by Tobias Knierim :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi there,

I have a problem with a redirect in OpenCMS 6.5.6.
A response.sendRedirect(location) gives me a 302. But I want to achieve a 301 redirect.

Modifying the header doesn't seem to work:

        HttpServletResponse response = (HttpServletResponse) pageContext.getResponse();
        response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
        response.setHeader("Location", location);
        response.setHeader("Connection", "close");


Is this a problem of the CMSFlexResponse?
Are there any ways to accomplish this redirect in OpenCMS?


Mit freundlichen Grüßen / Best regards


Tobias Knierim

_______________________________________________
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/mailman/listinfo/opencms-dev

Re: 301 redirect

by Olaitan Olamilehin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

You have to set it through the CmsJspBean using CmsJspBean.setStatus()
and CmsJspBean.getResponse().setHeader() methods.

Regards

On Mon, 2009-10-12 at 09:53 +0200, Tobias Knierim wrote:

> Hi there,
>
> I have a problem with a redirect in OpenCMS 6.5.6.
> A response.sendRedirect(location) gives me a 302. But I want to achieve a 301 redirect.
>
> Modifying the header doesn't seem to work:
>
> HttpServletResponse response = (HttpServletResponse) pageContext.getResponse();
> response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
> response.setHeader("Location", location);
> response.setHeader("Connection", "close");
>
>
> Is this a problem of the CMSFlexResponse?
> Are there any ways to accomplish this redirect in OpenCMS?
>
>
> Mit freundlichen Grüßen / Best regards
>
>
> Tobias Knierim
>
> _______________________________________________
> 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/mailman/listinfo/opencms-dev


_______________________________________________
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/mailman/listinfo/opencms-dev

new features in OpenCms 7.5.1...

by Asnidren :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi
I installed OpenCms 7.5.1 and I wonder how to use new features like
* hide "Advanced" button of property dialog depending on the current
users groups
* SMPT ports are now configurable
* Improved HTML widget button configuration and unstructured content
button configuration options (which?)
* Added option to set global default widget configurations

Is there exemples in documentation?

_______________________________________________
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/mailman/listinfo/opencms-dev

Re: 301 redirect

by Tobias Knierim :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you, this works perfectly!

Regards

-----Ursprüngliche Nachricht-----
Von: Olaitan Olamilehin [mailto:olaitan.olamilehin@...]
Gesendet: Montag, 12. Oktober 2009 10:29
An: The OpenCms mailing list
Betreff: Re: [opencms-dev] 301 redirect

Hi,

You have to set it through the CmsJspBean using CmsJspBean.setStatus()
and CmsJspBean.getResponse().setHeader() methods.

Regards

On Mon, 2009-10-12 at 09:53 +0200, Tobias Knierim wrote:

> Hi there,
>
> I have a problem with a redirect in OpenCMS 6.5.6.
> A response.sendRedirect(location) gives me a 302. But I want to achieve a 301 redirect.
>
> Modifying the header doesn't seem to work:
>
> HttpServletResponse response = (HttpServletResponse) pageContext.getResponse();
> response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
> response.setHeader("Location", location);
> response.setHeader("Connection", "close");
>
>
> Is this a problem of the CMSFlexResponse?
> Are there any ways to accomplish this redirect in OpenCMS?
>
>
> Mit freundlichen Grüßen / Best regards
>
>
> Tobias Knierim
>
> _______________________________________________
> 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/mailman/listinfo/opencms-dev


_______________________________________________
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/mailman/listinfo/opencms-dev

_______________________________________________
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/mailman/listinfo/opencms-dev