I have the following url which i want to write a helicon RewriteRule rule it should check the pattern startat=/mypage.asp and then only execute
Original url
the new url
as i am new to helicon and regex ,can someone help me
appreciate your help
something like:
RewriteRule ^/welcome.asp(.+)$ /mynewpage.hcx$1 [RP]
Will match any url starting with /welcome.asp, and $1 will contain the rest of the url.
Not sure about the [] part, but RP is permanent redirect (aka, 301)
EDIT: You could try this:
RewriteRule ^/welcome.asp(. startat=/mypage.asp. )$ /mynewpage.hcx$1 [RP]
.* <- 0 or more chars .+ <- 1 or more chars
so basically it translates to: start with /welcome.asp, 0 or more chars followed by "startat=/mypage.asp", followed by 0 or more chars until end of url.
Redirect to mynewpage.hcx followed by any content from the first paranthesis.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.