I currently try to redirect the HTTP-request to HTTPS, but couldnt find a solution for this,

in my httpd.conf I have the following redirection to my Tomcat application:

RedirectMatch permanent ^/$ /sweetApp/

I found out that I can use

Redirect or RedirectMatch or (RewriteCond and RewriteRule) - Combinations

in the HTTPD.conf.

Another way seems to be the HTACCESS-File, but I'm working on Windows and dont know how / dont want to use a HTACCESS-File.

How can I perform this redirection?

(I have no Virtual Hosts, using a plain single site installation)


So according to your description you have two hosts defined, one is for HTTP and one is for HTTPS, right?

So in the one for HTTP you can add a line like this one:

RedirectMatch .* https://yourdomain

This will match the requested URI against the pattern .*, so it will always match. Then it redirects to the absolute URL https://yourdomain

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.