<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>how to auto-redirect to https</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=120483682" />
  <subtitle>how to auto-redirect to https</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=120483682</id>
  <updated>2026-04-04T13:31:20Z</updated>
  <dc:date>2026-04-04T13:31:20Z</dc:date>
  <entry>
    <title>RE: RE: how to auto-redirect to https</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120483833" />
    <author>
      <name>Scarletake Bwi</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120483833</id>
    <updated>2020-12-02T11:07:47Z</updated>
    <published>2020-12-02T11:07:47Z</published>
    <summary type="html">&lt;p&gt;thank you&lt;/p&gt;
&lt;p&gt;i find the reason i failed.&lt;/p&gt;
&lt;p&gt;because my server be triggered by eclipse, so, it copy the web.xml
  from &amp;lt;eclipse wrokspase&amp;gt;/servers/&amp;lt;Liferay 6.2 CE(Tomcat) from local&amp;gt;/web.xml&lt;/p&gt;</summary>
    <dc:creator>Scarletake Bwi</dc:creator>
    <dc:date>2020-12-02T11:07:47Z</dc:date>
  </entry>
  <entry>
    <title>RE: how to auto-redirect to https</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120483815" />
    <author>
      <name>Christoph Rabel</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120483815</id>
    <updated>2020-12-02T11:07:51Z</updated>
    <published>2020-12-02T10:30:42Z</published>
    <summary type="html">&lt;p&gt;The config in the blog should work in general, but you need to edit
  the web.xml in tomcat/webapps/ROOT/WEB-INF/. Note: When you edit and
  save it, the server crashes (probably). So, I would only edit the file
  when the server is stopped.&lt;/p&gt;
&lt;p&gt;General advice: Could you add a reverse proxy? Believe me, things
  like redirects and certificates are far easier to manage on a reverse
  proxy like Apache or Nginx.&lt;/p&gt;</summary>
    <dc:creator>Christoph Rabel</dc:creator>
    <dc:date>2020-12-02T10:30:42Z</dc:date>
  </entry>
  <entry>
    <title>how to auto-redirect to https</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120483681" />
    <author>
      <name>Scarletake Bwi</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120483681</id>
    <updated>2020-12-02T07:50:06Z</updated>
    <published>2020-12-02T07:39:11Z</published>
    <summary type="html">&lt;p&gt;hi&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;i use 6.2, i try to add ssl, follow the steps with&lt;/p&gt;
&lt;p&gt;
  &lt;a href="https://liferay.dev/blogs/-/blogs/ssl-configuration-in-liferay-https-"&gt;https://liferay.dev/blogs/-/blogs/ssl-configuration-in-liferay-https-&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;it works.&lt;/p&gt;
&lt;p&gt;but when try access it, the first time in welcom page, it does not
  redirect to https, only after i do somthing.&lt;/p&gt;
&lt;p&gt;my question are:&lt;/p&gt;
&lt;p&gt;1. how can i access https directly, &lt;/p&gt;
&lt;p&gt;2. in this artical, i have to add code in web.xml, but i found many
  web.xml in many folder, should i just modify
  &amp;lt;liferay6.2&amp;gt;/tomcat-7.0.62/conf/web.xml? or web.xml from my ext project?&lt;/p&gt;
&lt;p&gt;for now, i add javascript&lt;/p&gt;

&lt;p&gt;if(window.location.protocol!='https:'){window.location.replace(&amp;quot;https://my liferay6.2/&amp;quot;); }&lt;/p&gt;
&lt;p&gt;in my welcome page.&lt;/p&gt;</summary>
    <dc:creator>Scarletake Bwi</dc:creator>
    <dc:date>2020-12-02T07:39:11Z</dc:date>
  </entry>
</feed>
