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

Fortiweb - Rewriting FQDN to other FQDN.

Hi,

i have a fortiweb 7.4.2. I would like to rewriting this host https://subdomain1.domain.com  to 

https://subdomain2.domain.com/home/it/home.page. My customer doesn't want the redirect url ma only the rewritng.url.

 

Thanks.

4 REPLIES 4
ozkanaltas
Valued Contributor III

Hello @rici1979 ,

 

You can follow that document to rewrite the URL. If you don't select the redirect option on the Request Action menu, FortiWeb will only do a rewrite URL. 

 

image.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

https://docs.fortinet.com/document/fortiweb/7.4.3/administration-guide/961303/rewriting-redirecting

 

 

 

If you have found a solution, please like and accept it to make it easily accessible to others.
NSE 4-5-6-7 OT Sec - ENT FW
If you have found a solution, please like and accept it to make it easily accessible to others.NSE 4-5-6-7 OT Sec - ENT FW
rici1979

Hi i tried with http header but it doesn't work. 

Follow the debug output.

URL Rewriting][Info]: (./waf_module/url_rewrite.c:2699): CLIENT -> SERVER.
[URL Rewriting][Info]: (./waf_module/url_rewrite.c:2639): Request host: [subdomain1.domain.com].
[URL Rewriting][Info]: (./waf_module/url_rewrite.c:2643): Request url: [/].
[URL Rewriting][Info]: (./waf_module/url_rewrite.c:1638): url rewrite policy name: [COLL-rewrite].
[URL Rewriting][Info]: (./waf_module/url_rewrite.c:576): url rewrite rule name: [COLL_rewrite_modulo_offerta_] ,check rule conds.
[URL Rewriting][Info]: (./waf_module/url_rewrite.c:589): the matching url :\
[URL Rewriting][Info]: (./waf_module/url_rewrite.c:704): not matched,and no invert,not matched.
[URL Rewriting][Info]: (./waf_module/url_rewrite.c:576): url rewrite rule name: [COLL_rewrite_portale_vendita] ,check rule conds.
[URL Rewriting][Info]: (./waf_module/url_rewrite.c:589): the matching url :\
[URL Rewriting][Info]: (./waf_module/url_rewrite.c:704): not matched,and no invert,not matched.
[URL Rewriting][Info]: (./waf_module/url_rewrite.c:576): url rewrite rule name: [COLL_offerta_page] ,check rule conds.
[URL Rewriting][Info]: (./waf_module/url_rewrite.c:589): the matching url :\
[URL Rewriting][Info]: (./waf_module/url_rewrite.c:704): not matched,and no invert,not matched.
[URL Rewriting][Info]: (./waf_module/url_rewrite.c:576): url rewrite rule name: [subdomain1.domain.com_COLL] ,check rule conds.
[URL Rewriting][Info]: (./waf_module/url_rewrite.c:584): the matching host :subdomain1.domain.com
[URL Rewriting][Info]: (./waf_module/url_rewrite.c:712): all conditons matched!
[URL Rewriting][Info]: (./waf_module/url_rewrite.c:1684): matched...
[URL Rewriting][Info]: (./waf_module/url_rewrite.c:1687): the pcre capture $0 is :
[URL Rewriting][Info]: (./waf_module/url_rewrite.c:1687): the pcre capture $1 is :
[URL Rewriting][Info]: (./waf_module/url_rewrite.c:1687): the pcre capture $2 is :
[URL Rewriting][Info]: (./waf_module/url_rewrite.c:1687): the pcre capture $3 is :
[URL Rewriting][Info]: (./waf_module/url_rewrite.c:1687): the pcre capture $4 is :
[URL Rewriting][Info]: (./waf_module/url_rewrite.c:1687): the pcre capture $5 is :
[URL Rewriting][Info]: (./waf_module/url_rewrite.c:1687): the pcre capture $6 is :
[URL Rewriting][Info]: (./waf_module/url_rewrite.c:1687): the pcre capture $7 is :
[URL Rewriting][Info]: (./waf_module/url_rewrite.c:1687): the pcre capture $8 is :
[URL Rewriting][Info]: (./waf_module/url_rewrite.c:1687): the pcre capture $9 is :
[URL Rewriting][Info]: (./waf_module/url_rewrite.c:1590): the action is :5
[URL Rewriting][Debug]: (./waf_module/url_rewrite.c:1602): -------- Do URL rewriting for URL "subdomain1.domain.com/" in request direction --------
Matched rule: "subdomain1.domain.com_COLL"
Triggered action: "Rewrite HTTP Header"
$VSERVER_PORT: 47873
[URL Rewriting][Info]: (./waf_module/url_rewrite.c:1217): the new host is : hsubdomain2.domain.com/home/it/home.page
[URL Rewriting][Debug]: (./waf_module/url_rewrite.c:1223): Rewrite Host from "subdomain1.domain.com" to "subdomain2.domain.com/home/it/home.page"

 

 

ozkanaltas
Valued Contributor III

Hello @rici1979 ,

 

Can you share your rewrite rule with us? 

If you have found a solution, please like and accept it to make it easily accessible to others.
NSE 4-5-6-7 OT Sec - ENT FW
If you have found a solution, please like and accept it to make it easily accessible to others.NSE 4-5-6-7 OT Sec - ENT FW
rici1979

Hi, i'm sorry but it's not possibile to share the url because my custmoer is an italian gov. company.

Thanks.

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