« Previous Next »

Thread: Rewriting hhh.domain.com/fluff to domain.com/abc/default.aspx?i=fluff

Last post 01-05-2009 7:32 PM by ruslany. 25 replies.

Average Rating Rate It (5)

RSS

Page 2 of 2 (26 items) < Previous 1 2

Sort Posts:

  • 11-17-2008, 3:56 PM In reply to

    • ruslany
    • Top 25 Contributor
    • Joined on 07-01-2007, 3:38 PM
    • Redmond, WA
    • Posts 664

    Re: Rewriting hhh.domain.com/fluff to domain.com/abc/default.aspx?i=fluff

    Can you post the rewrite rule?

    http://ruslany.net
  • 11-18-2008, 1:39 PM In reply to

    Re: Rewriting hhh.domain.com/fluff to domain.com/abc/default.aspx?i=fluff

       <rules>
            <rule name="Business Cards Rewrite">
              <match url=".*" />
              <conditions>
                <add input="{HTTP_HOST}" pattern="business-cards" />
                <add input="{Business Cards:{REQUEST_URI}}" pattern="(.+)" />
              </conditions>
              <action type="Rewrite" url="{C:1}" />
            </rule>

  • 11-18-2008, 2:07 PM In reply to

    • ruslany
    • Top 25 Contributor
    • Joined on 07-01-2007, 3:38 PM
    • Redmond, WA
    • Posts 664

    Re: Rewriting hhh.domain.com/fluff to domain.com/abc/default.aspx?i=fluff

    Your rewrite map uses REQUEST_URI as an input. REQUEST_URI does not contain any information about the host. For example, if you request http://business-cards.mysite.com/ then REQUEST_URI will contain just "/". So you would have to have an entry in rewrite map like this:

    <add key="/" value="/Storefront/ProductCategory.aspx?PC-ID=2008 ">

    http://ruslany.net
  • 11-18-2008, 2:56 PM In reply to

    Re: Rewriting hhh.domain.com/fluff to domain.com/abc/default.aspx?i=fluff

     got it .. thanks.

     Is there some kinda documentation that explains all these different variables that we can use to setup rules?

  • 11-18-2008, 3:08 PM In reply to

    • ruslany
    • Top 25 Contributor
    • Joined on 07-01-2007, 3:38 PM
    • Redmond, WA
    • Posts 664

    Re: Rewriting hhh.domain.com/fluff to domain.com/abc/default.aspx?i=fluff

  • 11-18-2008, 5:21 PM In reply to

    Re: Rewriting hhh.domain.com/fluff to domain.com/abc/default.aspx?i=fluff

     Thanks again for your help!

  • 11-24-2008, 11:13 PM In reply to

    • gonze1
    • Not Ranked
    • Joined on 11-25-2008, 4:08 AM
    • Posts 2

    Re: Rewriting hhh.domain.com/fluff to domain.com/abc/default.aspx?i=fluff

    can you please help me with this? I am trying to get sub1.domain.com to go to sub1,domain.com/Default.aspx?Distributor=Sub1

    ---------------------------------------------------------

    <rewrite>
                <rules>
                    <rule name="SubDomain" stopProcessing="false">
                        <match url="^[^.]+\.domain\.com" />
                        <conditions>
                            <add input="{HTTP_HOST}" pattern="^[^.]+\.domain\.com" />
                        </conditions>
                        <action type="Rewrite" url="/Default.aspx?Distributor={R:0}" />
                    </rule>
                </rules>
            </rewrite>

    ---------------------------------------------------------

    Please help Ruslany

  • 12-01-2008, 1:16 PM In reply to

    • ruslany
    • Top 25 Contributor
    • Joined on 07-01-2007, 3:38 PM
    • Redmond, WA
    • Posts 664

    Re: Rewriting hhh.domain.com/fluff to domain.com/abc/default.aspx?i=fluff

    If you want the request to http://sub1.domain.com/ to be rewritten to /Default.aspx?Distributor=sub1, then the rule will need to be changed as follows:

    <rewrite>
                <rules>
                    <rule name="SubDomain" stopProcessing="false">
                        <match url=".*" />
                        <conditions>
                            <add input="{HTTP_HOST}" pattern="^([^.]+)\.domain\.com" />
                        </conditions>
                        <action type="Rewrite" url="Default.aspx?Distributor={C:1}" />
                    </rule>
                </rules>
            </rewrite>

    http://ruslany.net
  • 12-01-2008, 11:21 PM In reply to

    • gonze1
    • Not Ranked
    • Joined on 11-25-2008, 4:08 AM
    • Posts 2

    Re: Rewriting hhh.domain.com/fluff to domain.com/abc/default.aspx?i=fluff

    Thank you so much Ruslany.

  • 01-02-2009, 2:03 AM In reply to

    Re: Rewriting hhh.domain.com/fluff to domain.com/abc/default.aspx?i=fluff

    I have only one doamin like http://www.WorldGroup.com, when users creating a group Example : FirstGroup, SecondGroup, ThridGroup, ......

    i need Rewriting URL http://FirstGroup.WorldGroup.com , http://SecondGroup.WorldGroup.com, http://ThidGroup.WorldGroup.com, ..to http://WorldGroup.com can any one advice to me with out creating subdomain...

    Advance Thanks

    Titus

    Titus
  • 01-05-2009, 7:32 PM In reply to

    • ruslany
    • Top 25 Contributor
    • Joined on 07-01-2007, 3:38 PM
    • Redmond, WA
    • Posts 664

    Re: Rewriting hhh.domain.com/fluff to domain.com/abc/default.aspx?i=fluff

    I do not know how this can be done without creating subdomains. I think you have to update the DNS records so that the address with subdomain is correctly resolved to the IP address of your server.

    http://ruslany.net
Page 2 of 2 (26 items) < Previous 1 2
Microsoft Communities