Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • pnr 131 posts 226 karma points
    Nov 13, 2009 @ 09:16
    pnr
    0

    Urlrewriting and 404 in endless loop

    I have setup som domains i urlrewriting.config that shall 301 to a main domain. I have also setup a default 404 on IIS to catch all access to non existing pages (.htm, .html ...). Now my problem is that Google link's to an old site using a domain that i make a 301 on. this is resulting in an endless loop.


    The link from google:

    http://www.MyOldDomainname/Produkt/29/Kategori/30/0/0 ; (this dosen't work any more)

    the request is redirected too:

    http://www.MyNewDomainname/404.aspx?404;http://www.MyOldDomainname/Produkt/29/Kategori/30/0/0

    This makes an endless loop because i am make a urlrewriting on http://www.MyOldDomainname, an that domain is sendt as a parameter to the 404

    Hov can i avoid that loop?

     

    Thanks in advance!

     

    .REQUEST { font: 8pt Courier New; color: blue;} .RESPONSE { font: 8pt Courier New; color: green;}

  • Chris Houston 535 posts 980 karma points MVP admin c-trib
    Nov 13, 2009 @ 09:52
    Chris Houston
    0

    Hi,

    Shouldn't you be re-directing to a URL like this:

    http://www.MyNewDomainname/404.aspx?error=404&url=http://www.MyOldDomainname/Produkt/29/Kategori/30/0/0

    The URL re-writing should not prevent this from working, if it does can you past your current urlrewriting.config file into the forum so that someone can help advise you what to change.

    Cheers,

    Chris

     

  • Chris Houston 535 posts 980 karma points MVP admin c-trib
    Nov 13, 2009 @ 09:53
    Chris Houston
    0

    Opps..

    Should have wrapped that in a code block:

    http://www.MyNewDomainname/404.aspx?error=404&url=http://www.MyOldDomainname/Produkt/29/Kategori/30/0/0

    Cheers,

    Chris

  • pnr 131 posts 226 karma points
    Nov 13, 2009 @ 11:10
    pnr
    0

    Hi Chris

    Thanks for your reply!

    I need a default 301 from the old domain to the new domain. On the new domain i need to catch all 404 including htm, html with more. My problem is that when i hit the link from Google that point at the olddomain, the IIS is redirecting the client to my 404 page with the none exsisting url as a parameter, then the urlrewriter catch the old url in the parameter, and then it loops...

    Thanks in advance.

Please Sign in or register to post replies

Write your reply to:

Draft