Rewrite URL this way, is it possible?

I

Iaml

We have a lot of legacy pages written in HTML or classic ASP. A lot
of our web users bookmarked these pages.

Now we will rewrite these HTML or classic ASP pages in ASP.NET 2.0 or
3.5.

I am using URLRewritingNet (http://www.urlrewriting.net/en/
Default.aspx) to redirect all requests in the format of *.htm, *.html
or *.asp to my asp.net pages. This is completely configured in
web.config.

This works great. But, we would also like to change the URL in the
browser's address bar from somepage.htm to somepage.aspx.

IMPORTANT: We are not allowed to explicitly do Response.Redirect.

Is there a way to do this? Please share your insights about this
issue. Thanks.
 
M

Munna

We have a lot of legacy pages written in HTML or classic ASP. A lot
of our web users bookmarked these pages.

Now we will rewrite these HTML or classic ASP pages in ASP.NET 2.0 or
3.5.

I am using URLRewritingNet (http://www.urlrewriting.net/en/
Default.aspx) to redirect all requests in the format of *.htm, *.html
or *.asp to my asp.net pages. This is completely configured in
web.config.

This works great. But, we would also like to change the URL in the
browser's address bar from somepage.htm to somepage.aspx.

IMPORTANT: We are not allowed to explicitly do Response.Redirect.

Is there a way to do this? Please share your insights about this
issue. Thanks.

Hi

seems you already touched the wall...
i am not sure whether it will help you or not but still

check out scott'g blog post on url rewrite

http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx

Best of luck

Munna
www.munna.shatkotha.com
www.munna.shatkotha.com/blog
www.shatkotha.com
 
I

Iaml

Hi

seems you already touched the wall...
i am not sure whether it will help you or not but still

check out scott'g blog post on url rewrite

http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewri...

Best of luck

Munnawww.munna.shatkotha.comwww.munna.shatkotha.com/blogwww.shatkotha.com

Thank you. I have read Scott's blog on that topic. Actually, I got
to know about URLRewritingNet from his blog.

Anyone else would like to give me a little hint?
 
R

rogers.terry

We have a lot of legacy pages written in HTML or classic ASP. A lot
of our web users bookmarked these pages.

Now we will rewrite these HTML or classic ASP pages in ASP.NET 2.0 or
3.5.

I am using URLRewritingNet (http://www.urlrewriting.net/en/
Default.aspx) to redirect all requests in the format of *.htm, *.html
or *.asp to my asp.net pages. This is completely configured in
web.config.

This works great. But, we would also like to change the URL in the
browser's address bar from somepage.htm to somepage.aspx.

IMPORTANT: We are not allowed to explicitly do Response.Redirect.

Is there a way to do this? Please share your insights about this
issue. Thanks.

To change the URL in the browser you want to send a redirect, if you
send a 301 HTTP Code ("Moved Permenantly") then search engines etc can
update their links to follow the new version.

Looking at the docs for UrlRewritingNet it looks like this is
supported, something like:
<urlrewritingnet>
<rewrites ... redirect="Application" redirectMode="Permanent" ... >
....
</rewrites>
</urlrewritingnet>
 
I

Iaml

A javascript re-direct, other than that it's impossible.

I have been wondering, too, how the URL in the address bar of a
browser can possibly be dynamically changed from the server side.

Could you give me a javascript sample code for this purpose? Thank
you.
 
I

Iaml

To change the URL in the browser you want to send a redirect, if you
send a 301 HTTP Code ("Moved Permenantly") then search engines etc can
update their links to follow the new version.

Looking at the docs for UrlRewritingNet it looks like this is
supported, something like:
<urlrewritingnet>
<rewrites ... redirect="Application" redirectMode="Permanent" ... >
...
</rewrites>
</urlrewritingnet>

Is this intrinsically Response.Redirect?
 
C

Cheeso

Redirection is a common feature of many Rewriting filters. IIRF is another
one that also supports redirect.

In answer to the question "is this intrinsically Response.Redirect?"... the
answer is yes. They are the same thing. But the response.Redirect is done
in your application code, while the rewriting filter isn't application code -
it's configuration data.

But the result on the wire is the same. If you sniffed the network you would
see an HTTP 301 or 302 response code, from either a rewriting filter, or from
Response.Redirect. The browser receives the response and then updates it's
address bar and sends out a request for the content from the "new" URL.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top