Support Forum
The Forums are a place to find answers on a range of Fortinet products from peers and product experts.
vagkom
New Contributor

FortWeb rewrite https://site1.domain.com to https://site2.domain.com/folder1

Hi everyone,

 

I'd appreciate your help.

My config is reverse proxy with deployment mode: Http content routing

I'd like when the user enters https://site1.domain.com to rewrite to https://site2.domain.com/folder1 which is hosted in the same configuration.

I have created a rewriting rule Request Action = Rewrite HTTP Header

Object: HTTP Host

Regular expression: site1.domain.com

and then below

Replacement Refer: https://site2.domain.com/folder1

 

But it is not working.

 

Regards

Vangelis

 

 

4 REPLIES 4
abelio
SuperUser
SuperUser

Hi Vangelis
If just that is the requirement, try simply with this:

- define an 'URL rewriting Rule', and include it in the respective 'URL rewriting policy'exampleexample

 

- Edit the ´web protection profile´ affecting the traffic of interest and select the defined 'url rewriting policy' under Application Delivery >  URL Rewriting.


- As your deployment mode is HTTP Content Routing, create the server policy, under http content routing, invoke your already defined 'server pool'  (such you're hosting https://site1.domain.com) and complete the policy with the web protection profile defined in the prior step.

Notes:
- there are a lot of assumptions here:
This content routing policy includes configured certificates , HTTPS service selected, etc.
- https://site1.domain.com and https://site2.domain.com are alive

- more complex requirements require more information

regards




/ Abel

regards / Abel
vagkom
New Contributor

Thank you Abel, but I was thinking of a solution that will not change the URL and the behavior will be like https://site1.domain.com, just like what VPS providers do.

In other words to host many projects like /projec1, /project2, /project3 and the site to be https://site1.domain.com , https://site2.domain.com, https://site3.domain.com without redirecting to relevant folders.

But anyway thank you for your kind answer.

 

Regards

Vangelis

abelio
SuperUser
SuperUser

Hello Vangelis

Then I didn't fully understand the original request. 
Can you please elaborate a little bit more ? 
What do you mean with "just like VPS providers do" ?


regards




/ Abel

regards / Abel
vagkom
New Contributor

Hello Abel,

 

VPS providers have the ability in one external ip to host many sites. This was my initial request.

Finally I solved it with the aid of technical support by adding a new rewrite rule as  documentation descibes.

Thank you again

Vangelis

Announcements

Select Forum Responses to become Knowledge Articles!

Select the “Nominate to Knowledge Base” button to recommend a forum post to become a knowledge article.

Labels
Top Kudoed Authors