Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
In general, any kind of redirect of that kind can be done via .htaccess file that the http/https server references before pumping out data to the visitor.
I believe it would be the following. I am not 100% sure about the format, but I think it is correct. If wrong, then it will at least get you going in the needed direction.
Within .htaccess file in your sites http folder (commonly public_html, or /var/http)
Point is the apache tomcat is not aware of .htaccess. You can connect tomcat with httpd via connectors (mod_jk) but it is pointless doing it for url redirect.
Thank You All,
I'm trying HttpRedirectFilter , but it does not work
<redirect-filter>
<redirect match="^(.*)$" target="www.example.com"/>
</redirect-filter>
where "/firstdir" is the dir of your http://example.com and "/seconddir" to https://www.example.com
I don't know if it actually works with url since it only has examples with working directories.
i removed port 80 tp 433 redirect in server.xml
when i use <redirect match="^/(.*)$" target="https://www.example.com"/>
in browser it will be http://example.com/https://www.example.com/
Last edited by hesisaboury; 05-17-2013 at 08:35 AM.
Finally
by changing /ROOT/index.html and editing URL , to htts://www.example.com/login ... i solved my Redirection Problem....of course till now i don't see any problem....
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.