ch2o
ch2o

Reputation: 839

asp.net hidden redirect with direction url

How to do it: When you access a certain page (like a folder), you can view information specific user, for example:

www.page.com/user001

Opens the default page www.page.com/userinfo.aspx in which that user get "user001" and display certain information. And the user see www.page.com/user001

I can do this with asp.net or IIS7? something like subdomains

Upvotes: 1

Views: 1170

Answers (3)

MeqDotNet
MeqDotNet

Reputation: 718

you can use routing in global.asax file at application_start event instead of rewrite the url also this will redirect every this to the profile page

Upvotes: 1

Harold Javier
Harold Javier

Reputation: 887

You can store the URL Rewrite rules in the web.config file. For example:

<configuration>
    <system.webServer>
        <rewrite>
            <rules>

****(Your URL Rewrite Rules)****

            </rules>
        </rewrite>
    </system.webServer>
</configuration>

But if it's not possible for you to store it in web.config due to security or maybe for some performance issues, then you can store the URL Rewrite Rules in IIS.

I hope it helps.

Upvotes: 2

Vincent James
Vincent James

Reputation: 1148

You can do this by adding the URL Rewrite Module to IIS. Check this out http://www.iis.net/learn/extensions/url-rewrite-module/using-rewrite-maps-in-url-rewrite-module

enter image description here

Upvotes: 2

Related Questions