im trying to rewitre from this URL...
/Search/VehicleDetails.aspx?vehicle=285584
to this one
/VehicleAdvert/tella/Friend/285584
so far i have been playing around with the rules and have this, which doesnt work...
<!-- Tell a Friend -->
<rule name="Tell a Friend" stopProcessing="true">
<match url="^.*(?:Search/VehicleDetails.aspx).*$" />
<conditions>
<add input="{QUERY_STRING}" pattern="vehicle=.*" />
</conditions>
<action type="Redirect" url="/VehicleAdvert/tella/Friend" redirectType="Permanent" appendQueryString="true" />
</rule>
The URL i get back is /VehicleAdvert/tella/Friend?vehicle=285584
what im after is -> /VehicleAdvert/tella/Friend/285584
can anyone suggest where im going wrong ?
thanks in advance :)
Truegilly
this solved it
<!-- Tell a Friend -->
<rule name="Tell a Friend" stopProcessing="true">
<match url="^.*(?:Search/VehicleDetails.aspx).*$" />
<conditions>
<add input="{QUERY_STRING}" pattern="vehicle=(\d+)" />
</conditions>
<action type="Redirect" url="/VehicleAdvert/tella/Friend/{C:1}" redirectType="Permanent" appendQueryString="false" />
</rule>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With