But I can't seem to get it to work. If I put the querystring in the old URL it matches this as well so /win/ doesn't work unless it has the QS attached.
If I put it in the destination URL it redirects without the domain name.
So your goal is to redirect from /win to /get-involved/ways-to-give/raffles-lotteries/poppy-lottery/?cfg=PLB&seg=RFZWEBWG2?
Can you post what you are using for the redirect? If you use the UrlRewriting.config, the url won't actually change. The user will not see the rewritten path, but destination content will be loaded.
I really like using the IIS Url Rewrite Module for redirects. See Url Rewrite Module documentation. First, you will need to install the Url Rewrite Module on the machines running your site. Then, all you need to do is add this to your web.config:
If you forget to install the Url Rewrite Module on a machine, you will get a really vague configuration error message from IIS, so don't forget to add the rewrite module if you try this.
Let me know if this helps or if I've missed what you are getting at.
My goal is to do all this in the Url Tracker as my editors need to be able to add in these redirects. So the short URL "win" is a landing page, that then takes the user to another page with codes that are tracked.
I've found a workaround. If I redirect to an alias of my site then it works. The alias is then redirected to the main domain in UrlRewriting.config.
Querystring redirect
I want to redirect all requests to
/win
to
/get-involved/ways-to-give/raffles-lotteries/poppy-lottery/?cfg=PLB&seg=RFZWEBWG2
But I can't seem to get it to work. If I put the querystring in the old URL it matches this as well so /win/ doesn't work unless it has the QS attached.
If I put it in the destination URL it redirects without the domain name.
So your goal is to redirect from
/win
to/get-involved/ways-to-give/raffles-lotteries/poppy-lottery/?cfg=PLB&seg=RFZWEBWG2
?Can you post what you are using for the redirect? If you use the UrlRewriting.config, the url won't actually change. The user will not see the rewritten path, but destination content will be loaded.
I really like using the IIS Url Rewrite Module for redirects. See Url Rewrite Module documentation. First, you will need to install the Url Rewrite Module on the machines running your site. Then, all you need to do is add this to your web.config:
Then create those two config files. For what you are trying to do here, you shouldn't need the
rules
. In the 'config/RewriteMaps.config' file, write:If you forget to install the Url Rewrite Module on a machine, you will get a really vague configuration error message from IIS, so don't forget to add the rewrite module if you try this.
Let me know if this helps or if I've missed what you are getting at.
My goal is to do all this in the Url Tracker as my editors need to be able to add in these redirects. So the short URL "win" is a landing page, that then takes the user to another page with codes that are tracked.
I've found a workaround. If I redirect to an alias of my site then it works. The alias is then redirected to the main domain in UrlRewriting.config.
Thanks
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.