You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Deepak Goel <de...@gmail.com> on 2022/06/22 09:15:43 UTC

[users@httpd] Redirect in 443

Hello

How do I create a redirect in 443 port in the apache web server 2?

I want to redirect the url :

https://mydomain.com/

to

https://mydomain.com/foo/

Please advise.

Thanks.

P.S:

If I add a redirect statement to the file 000-default-le-ssl.conf - port
443 (Redirect / https://mydomain.com/foo/)  it goes to the url (
https://mydomain.com/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo) instead of (
https://mydomain.com/foo/)

Deepak
"The greatness of a nation can be judged by the way its animals are treated
- Mahatma Gandhi"

+91 73500 12833
deicool@gmail.com

Facebook: https://www.facebook.com/deicool
LinkedIn: www.linkedin.com/in/deicool

"Plant a Tree, Go Green"

Make In India : http://www.makeinindia.com/home

Re: [users@httpd] Redirect in 443

Posted by Frank Gingras <th...@apache.org>.
Use RedirectMatch with a negative lookahead instead to prevent loops.

On Wed, 22 Jun 2022 at 05:16, Deepak Goel <de...@gmail.com> wrote:

> Hello
>
> How do I create a redirect in 443 port in the apache web server 2?
>
> I want to redirect the url :
>
> https://mydomain.com/
>
> to
>
> https://mydomain.com/foo/
>
> Please advise.
>
> Thanks.
>
> P.S:
>
> If I add a redirect statement to the file 000-default-le-ssl.conf - port
> 443 (Redirect / https://mydomain.com/foo/)  it goes to the url (
> https://mydomain.com/foo/foo/foo/foo/foo/foo/foo/foo/foo/foo) instead of (
> https://mydomain.com/foo/)
>
> Deepak
> "The greatness of a nation can be judged by the way its animals are
> treated - Mahatma Gandhi"
>
> +91 73500 12833
> deicool@gmail.com
>
> Facebook: https://www.facebook.com/deicool
> LinkedIn: www.linkedin.com/in/deicool
>
> "Plant a Tree, Go Green"
>
> Make In India : http://www.makeinindia.com/home
>
>