Copied to clipboard

Flag this post as spam?

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


  • David 26 posts 50 karma points
    Jul 05, 2010 @ 11:52
    David
    0

    Domain consolidation with UrlRewriting.config

    Hi everyone,

    Here again with a very techical question that only the best will stand a chance of answering (I think) ;)

    I am trying to give our design team greater ability to control the URL rewrites of the site as opposed to asking a server dude (a.k.a. me) to perform the rewriting configuraiton for them.

    I have a half-solution in that the excellent "config tree" package by Tim Geyssens allows my guys to edit the UrlRewriting.config file and add new redirects.

    • I can internally redirect a virtual directoty to an existing file. (e.g. /myredirect to /my-real-page.aspx)
    • I can also redirect one domain to another domain (e.g. olddomain.com/mypage.aspx to newdomain.com/mypage.aspx)

    However, what I cannot do is redirect all incoming domain names if the are not equal to my main website domain.  For example, I may have mydomain1.com, mydomain2.com and mydomain3.com all poiting to the single Umbraco instance and to aggregate my Google pagerank I need to consolidate to a single domain.  Becuase my clients could point any domain to the Umbraco instance I need a consolidation rule that copes with all domains other than my single consolidated domain of choice.

    I hope that this makes sense and that someone really bright can help me.

    If it helps, I can solve this at the server with the following htaccess rule, however my design team, again, cannot access this without assistance:

    # Consolidate domains (With .htaccess file)...
    RewriteCond %{HTTP_HOST} !www\.my-single-domain\.com$ [NC]
    RewriteRule ^(.*)$ http://www\.my-single-domain\.com/$1 [R=301]

    Kind regards,
    David

     

Please Sign in or register to post replies

Write your reply to:

Draft