Quantcast
Channel: URL Rewrite Module
Viewing all articles
Browse latest Browse all 2482

Redirect to a Different Domain But Keep The Rest of the URL (after Domain)

$
0
0

Dear All

I'm sorry to ask for help but I have tried to create a rewrite rule so that all traffic going to my old server will be redirected to my new server. The problem is it just doesn't seem to be having any effect at all.

<rewrite><rules><rule name="Redirect to Gateway" stopProcessing="true"><match url="https://gw.st-wilfrids.w-sussex.sch.uk/(.*)" /><conditions><add input="{HTTP_HOST}" pattern="https://gw.st-wilfrids.w-sussex.sch.uk/(.*)" /></conditions><action type="Redirect" url="https://gateway.stwilfridscatholiccollege.co.uk/{R:1}" /></rule></rules></rewrite>

I would like any traffic that was going to https://gw.st-wilfrids.w-sussex.sch.uk to be redirected to https://gateway.stwilfridscatholiccollege.co.uk but then always maintain the correct stuff after this portion of the URL (for example if it said https://gw.st-wilfrids.w-sussex.sch.uk/sites/staff/default.aspx?id=101, the bit from /sites/staff/default.aspx?id=101 should be carried over.

Please can anyone see what I've done wrong?

Many thanks

DAniel


Viewing all articles
Browse latest Browse all 2482

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>