Forum Discussion
John_Merritt_45
Nimbostratus
Nov 06, 2006Need help with multi domain url rewrite
I am new to the iRule world. I have multiple domains that I need to rewrite. The first group should all rewrite to the same url. However I have another domain that I want to rewrite to a second url...
steve_cross_650
Nimbostratus
Nov 15, 2006I was trying to do something similar to what Joe recommended but unfortunately it does not seem to be working. I am basically trying to automatically redirect to an https page when a user goes to a specific page:
class secure_pages {
"\page1.aspx"
"\page2.aspx"
"\page3.aspx"
"\page4.aspx"
}
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] equals "test.mywebsite.com"}
{
if { [matchclass [string tolower [HTTP::uri]] starts_with $::secure_pages]}
{
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
}
else
{
pool pool_A
}
}
else
{
pool pool_B
}
}
However when I try to use the above code, I get the following error:
line 1: [undefined procedure: class] [class secure_pages {
"\page1.aspx"
"\page2.aspx"
"\page3.aspx"
"\page4.aspx"
}]
How do I properly add a "class" via the web GUI? Sorry if this is NEWBIE question, I am just learning iRule syntax.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects