Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Is that any one Help me, here,
i have created URL like aarti.domain.com using a particular code which i have add here,
sub-domain URL is creating but This webpage is not available i am getting this error in sub-domain URL page.

This is a code by which i have created a URL like sub-domain. its creating URL but page is not showing with data.
Any one can tell me whats Wrong here.
and how i can show data in my sub-domain url.
Your solution will help me To solve This Big Issue.



XML
<rewrite>
    <rules>
        <rule name="Redirect to Subdomains" stopProcessing="true">
            <match url="^xyzPage.aspx$" />
            <conditions>
                <add input="{QUERY_STRING}" pattern="^barvalue=(.+)$" />
            </conditions>
            <action type="Redirect" url="http://{C:1}.{HTTP_HOST}" appendQueryString="false" />
        </rule>
    </rules>
</rewrite>
Posted
Updated 14-Apr-15 6:37am
v2
Comments
Sri Nivas.M 13-Apr-15 5:24am    
Check this : http://stackoverflow.com/questions/183928/how-to-let-php-to-create-subdomain-automatically-for-each-user
Aarti Yadav 13-Apr-15 5:46am    
this is for php i want in asp.net
Sri Nivas.M 13-Apr-15 6:00am    
In the first answer he mentioned to use the wildcard. For that you will need to do changes in Binding of IIS .

For URL rewrite also same thing
Aarti Yadav 16-Apr-15 5:14am    
any one help me
Aarti Yadav 13-Apr-15 6:29am    
we can not create url progrmatically.

1 solution

 
Share this answer
 
Comments
Aarti Yadav 14-Apr-15 4:29am    
can any one tell me how to use this code..

i am inserting this code in web config. on live website , but its not working.

plz tell me how to use this..

<rule name="rewrite to subdomain" stopprocessing="true">
<match url="^username=([^/]+)(.*)$">
<conditions>
<add input="{HTTP_HOST}" pattern="^www\.domain\.com$">

<action type="Redirect" url="http://{R:1}.domain.com{R:2}" redirecttype="Permanent">

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900