- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To redirect/rewrite website root URL to Sub directory in FortiWeb 7.4.2
Hi All !
Im a newbie in using Fortinets products and need your expertise to assist of the followings : -
User wanted to access https://my-website.com/ but want it to automatically redirect to https://my-website.com/irj/portal/ as root directory is empty.
Tried googling and testing through the Application > URL Rewriting Policy & Rule but to no avail. Any steps or KB that I can use to resolve this ?
- Labels:
-
FortiWeb
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @pewdiedan2
Add a URL rewriting policy that you use in your Web Protection Profile.
This policy will contain a URL Rewriting Rule like this:
- Action Type: Request Action
- Request Action: Redirect (301 Permanently)
- URL Rewriting Condition: URL: index.html
- Replacement Location: /irj/portal/
So your redirect rule should look like this:
Another way to do is on your back-end Web server you can simply insert this code in your index.html, and no need to do anything on your FortiWeb.
<html> <head> <meta http-equiv="refresh" content="0; url='https://www.ibm.com'" /> </head> </html>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @AEK ! Thanks for the reply!
I tested but its still not working. I've verified that the policy has been enforced.
Or is there any missing information on the rule i created ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In the rewriting condition you entered "/irj/portal/" as URL. That's wrong. You should enter /index.html as explained before, which is the default page when you enter your site.
