Copied to clipboard

Flag this post as spam?

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


  • Lee Lovell 6 posts 26 karma points
    Aug 06, 2013 @ 16:07
    Lee Lovell
    0

    URL Rewrite - Rewrite "not redirect" but still referencing "host" URL

    Hi,

    I'm familiar with URL Rewriting and already have many complex entries but this one baffles me.

    I'm using the built in URLRewriting.Net and Version 4.9.1 of Umbraco.

    I have several domains pointing to the same Umbraco installation - For example www.test1.com & www.test2.com

    Under these I have country nodes /ab and /cd so both sites can access these by www.test1.com/ab/ www.test1.com/cd/ and www.test2.com/ab/ and www.test2.com/cd/

    However, where I have an issue is that some other pages that are dynamic such as

    www.test1.com/forename.surname and www.test2.com/forename.surname I want to rewrite to point to a page under their specific node.

    So imagine I want all

    www.test1.com/forename.surname to rewrite to www.test1.com/ab/testpage and www.test2.com/forename.surname to rewrite to www.test2.com/cd/testpage

    /Forename.surname I can't hard code as rewrite rules as they change dynamically (I can use a regex to pick these up fine).

    I need to reference the host url to know which node to send them down but using a domain redirect will change the URL and I need to leave it as www.test1.com/forename.surname etc .... so therefore need to rewrite the URL.

    I have no control over the URLs so can not amend them to include a clue / node etc.

    Any info appreciated. I've looked down the many forum posts but haven't matched the requirement anywhere.

    Many thanks

    Lee

  • Lee Lovell 6 posts 26 karma points
    Aug 06, 2013 @ 16:16
    Lee Lovell
    0

    Hmmm, have I overlooked redirect ="Application" ? Does this redirect the application but not change the URL?

  • Lee Lovell 6 posts 26 karma points
    Aug 07, 2013 @ 09:14
    Lee Lovell
    0

    The above didn't seem to work. Any suggestions? If only Server.Transfer worked with Umbraco installations.

  • Lee Lovell 6 posts 26 karma points
    Aug 07, 2013 @ 12:31
    Lee Lovell
    0

    FYI, managed to solve my own issue by using either page and looking up the URL then setting the Model so the page and urls on the served page were the same as the other page. Hope that makes sense.

    It means www.test1.com/forename.surname can use www.test1.com/ab/ or www.test2.com/cd/ and still show the correct data.

    Not ideal and using URLRewriting.net would have been better but due to time constraints this works.

Please Sign in or register to post replies

Write your reply to:

Draft