Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi
Im using urlrewriting to 301 redirect multiple domains to on main domain. Works like a charm except for one domain... .co
<add name="co" virtualUrl="http\://www.mysite.co" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="http://mysite.com" redirect="Domain" redirectMode="Permanent" ignoreCase="true" />
This redirect causes the site to crash with too many redirects... I guess it must be some wild card thing with .co and .com... But how do i fix it?
Thanks
Hi,
Try to use this value: virtualUrl="http\://www.mysite.co$"
The $ in a regex marks the end of a search pattern.
/David
hmmmm that doesnt seem to do anything
Did you do an app / apppool restart, don't remember wether the file gets loaded again on changes.
It does, cause im testing on it right now with other things, and those changes get loaded
And what happens when you add a trailing "/"
virtualUrl="http\://www.mysite.co/"
I suggest trying:
<add name="co" virtualUrl="http\://www.mysite.co/(.*)" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="http://mysite.com/$1" redirect="Domain" redirectMode="Permanent" ignoreCase="true" />
This will keep the text after the slash, e.g. /news, and append to the .com URL, and it should stop the matching of .com to this rewrite rule.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
urlrewriting .co to .com
Hi
Im using urlrewriting to 301 redirect multiple domains to on main domain. Works like a charm except for one domain... .co
This redirect causes the site to crash with too many redirects... I guess it must be some wild card thing with .co and .com... But how do i fix it?
Thanks
Hi,
Try to use this value: virtualUrl="http\://www.mysite.co$"
The $ in a regex marks the end of a search pattern.
/David
hmmmm that doesnt seem to do anything
Did you do an app / apppool restart, don't remember wether the file gets loaded again on changes.
It does, cause im testing on it right now with other things, and those changes get loaded
And what happens when you add a trailing "/"
virtualUrl="http\://www.mysite.co/"
I suggest trying:
This will keep the text after the slash, e.g. /news, and append to the .com URL, and it should stop the matching of .com to this rewrite rule.
is working on a reply...