once our client asked us to hide the site urls that is
if my project is having 3 pages say
Home.aspx
page1.aspx
page2.aspx
and page 3.aspx
so when ever i was running project my url was shown as
http://localhost/MyProject/Page1.aspx for page 1
http://localhost/MyProject/Home.aspx for HomePage
http://localhost/MyProject/Page2.aspx for page 2
http://localhost/MyProject/Page3.aspx for page 3
so our client asked us to stop hiding all those urls and show only one url ile.,
http://localhost/MyProject/index.aspx for all the pages
so we came up with the solution called URL REWRITE CONCEPT USING IFRAME
Step1) we created one Empty aspx page named index.aspx
and in design code we placed the Following line of code
<pre>
< iframe src=”Home.aspx” width=”100%” height=”100%” frameborder=”0″ scrolling=”yes” >
<pre>
before Form tag
in index.aspx page
Step 2) set index.aspx as startpage
Step 3) provide link to other pages in home.aspx
step 4) Run the Web Project
here onwords the index.aspx will run internally Home.aspx there by hiding url of Home.aspx inside it
and once we are in home.aspx we can navigate to page1.aspx or page2.aspx inside it but the url wont change
it remain same as
http://localhost/MyProject/index.aspx even when in Page1 or 2 or 3 .aspx
————————————————–
if the iframe is coming in small window or half of the screen use this script for getting
full screen out put
< html >
< head runat=”server” >
< title></title >
< style type=”text/css” >
html, body, div, iframe { margin:0; padding:0; height:100%; }
iframe { display:block; width:100%; border:none; }
< /style >
< /head >
< body >
< iframe src=”Home.aspx” >< /iframe >
< /body >
< /html >
ok we hide the url. suppose i know the url . if i type the url in address bar means it shows the page. how to restrict that
use Rules in your iis please refer this Link it might be use full for you
http://learn.iis.net/page.aspx/497/user-friendly-url—rule-template/