473,765 Members | 2,121 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hide ASPX Extension

Does anyone know how to hide the ASPX extension of web pages in ASP.Net 2.0?

Thanks,

Matt
May 19 '06
13 4523
Juan,

I have never heard of this method nor ever seen it implemented. Where can I find more information about it's use and how to implement it?

Thanks,

Matt
"Juan T. Llibre" <no***********@ nowhere.com> wrote in message news:Ov******** ******@TK2MSFTN GP04.phx.gbl...
Gerry,

inherent to *every* question is the underlying metainfo
as to whether the answer sought is convenient or not.

That saves a lot of barking up the wrong trees,
and warns all readers about the pitfalls in proposed code.

In this case, implementing what you proposed would increase the server workload
by a large factor, reducing the throughput for the server where that "solution" is implemented.

Sorry, nothing personal, but the proposed answer,
though technically correct, is worthless as a solution.

In any case, it's much simpler to hide the aspx extension by using a frameset in which
the first frame has zero for its number of rows and all the content is written in the
second frame, with * specified in the default frameset for the number of its rows.

That will, effectively, hide the extension for the default page but won't overload the server.
All other pages are exposed as links which have the 2nd frame as their target.

This is an old HTML trick to hide page extensions, although it has nothing to do with ASP.NET.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"gerry" <ge**@nospam.no spam> wrote in message news:e4******** ******@TK2MSFTN GP02.phx.gbl...
sure - but that wasn't the question being asked.
"Juan T. Llibre" <no***********@ nowhere.com> wrote in message
news:er******** ********@TK2MSF TNGP02.phx.gbl. ..
If you do that, I fear your site's throughput will sink.

What you are suggesting would increase the site's processing by at least

2-300%
which would reduce your site's throughput to 33% or 25% of what it should

handle.

For what ? For an esthetic "hide my extension" consideration ?

Thanks, but no thanks.

I value ASP.NET for its processing capability, which allows me to have

much
more throughput than comparable platforms...wit h a lot less programming

effort.

Hobbling my web server to satisfy an esthetic desire is pointless, imho.
Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"gerry" <ge**@nospam.no spam> wrote in message

news:Oq******** ******@TK2MSFTN GP04.phx.gbl...
configure iis to have all requests ( * ) handled by asp.net
configure the appropriate static resource handlers in your web.config -

.gif , .js , .css etc
in Application_Beg inRequest use url rewriting to send the remaining

requests to the proper handler

ie
requests for http://www.mysite.com sent to default.aspx
requests for http://www.mysite.com/products sent to products.aspx
requests for http://www.mysite.com/support sent to support.aspx
...
Gerry "Matt" <md*****@sorviv e.DONT-SEND-SPAM.com> wrote in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
Does anyone know how to hide the ASPX extension of web pages in ASP.Net

2.0?

Thanks,

Matt

May 21 '06 #11
re:
I have never heard of this method nor ever seen it implemented.
Where can I find more information about it's use and how to implement it?
That method not only hides the extension, it hides the whole filename!

It's quite simple :

default.aspx :
=========
<html>
<head>
<title>Main</title>
</head>
<frameset rows="0,*">
<frame name="a" scrolling="no" noresize="nores ize" target="main" src="a.aspx">
<frameset cols="*">
<frame name="main" src="main.aspx" >
</frameset>
<noframes>
<body>
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
</frameset>
</html>
======

main.aspx :
========
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Frameset </title>
</head>
<body>
<a href="someother .aspx" target="main">S ome other ASPX page</a>
</body>
</html>
=======

That's it!

You can place links to any *.aspx page in main.aspx, and they will be displayed
in the "main" frame without the filename being displayed in the browser!

You'll probably need to include some sort of navigation menu in all the pages linked to in
main.aspx.
You'll also need to include Page and Language directives if you need them.

That shouldn't be too hard of a job...


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"Matt" <md*****@sorviv e.DONT-SEND-SPAM.com> wrote in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
Juan,

I have never heard of this method nor ever seen it implemented. Where can I find more information
about it's use and how to implement it?

Thanks,

Matt
"Juan T. Llibre" <no***********@ nowhere.com> wrote in message
news:Ov******** ******@TK2MSFTN GP04.phx.gbl...
Gerry,

inherent to *every* question is the underlying metainfo
as to whether the answer sought is convenient or not.

That saves a lot of barking up the wrong trees,
and warns all readers about the pitfalls in proposed code.

In this case, implementing what you proposed would increase the server workload
by a large factor, reducing the throughput for the server where that "solution" is implemented.

Sorry, nothing personal, but the proposed answer,
though technically correct, is worthless as a solution.

In any case, it's much simpler to hide the aspx extension by using a frameset in which
the first frame has zero for its number of rows and all the content is written in the
second frame, with * specified in the default frameset for the number of its rows.

That will, effectively, hide the extension for the default page but won't overload the server.
All other pages are exposed as links which have the 2nd frame as their target.

This is an old HTML trick to hide page extensions, although it has nothing to do with ASP.NET.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"gerry" <ge**@nospam.no spam> wrote in message news:e4******** ******@TK2MSFTN GP02.phx.gbl... sure - but that wasn't the question being asked.
"Juan T. Llibre" <no***********@ nowhere.com> wrote in message
news:er******** ********@TK2MSF TNGP02.phx.gbl. ..
If you do that, I fear your site's throughput will sink.

What you are suggesting would increase the site's processing by at least

2-300%
which would reduce your site's throughput to 33% or 25% of what it should

handle.

For what ? For an esthetic "hide my extension" consideration ?

Thanks, but no thanks.

I value ASP.NET for its processing capability, which allows me to have

much
more throughput than comparable platforms...wit h a lot less programming

effort.

Hobbling my web server to satisfy an esthetic desire is pointless, imho.
Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"gerry" <ge**@nospam.no spam> wrote in message

news:Oq******** ******@TK2MSFTN GP04.phx.gbl...
configure iis to have all requests ( * ) handled by asp.net
configure the appropriate static resource handlers in your web.config -

.gif , .js , .css etc
in Application_Beg inRequest use url rewriting to send the remaining

requests to the proper handler

ie
requests for http://www.mysite.com sent to default.aspx
requests for http://www.mysite.com/products sent to products.aspx
requests for http://www.mysite.com/support sent to support.aspx
...
Gerry "Matt" <md*****@sorviv e.DONT-SEND-SPAM.com> wrote in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
Does anyone know how to hide the ASPX extension of web pages in ASP.Net

2.0?

Thanks,

Matt


May 21 '06 #12
Jaun,

Thanks a bunch! I will definitely look into doing this. Do you know if using master pages with this methods would cause any issues?

Thanks again,

Matt
"Juan T. Llibre" <no***********@ nowhere.com> wrote in message news:uR******** ******@TK2MSFTN GP04.phx.gbl...
re:
I have never heard of this method nor ever seen it implemented.
Where can I find more information about it's use and how to implement it?
That method not only hides the extension, it hides the whole filename!

It's quite simple :

default.aspx :
=========
<html>
<head>
<title>Main</title>
</head>
<frameset rows="0,*">
<frame name="a" scrolling="no" noresize="nores ize" target="main" src="a.aspx">
<frameset cols="*">
<frame name="main" src="main.aspx" >
</frameset>
<noframes>
<body>
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
</frameset>
</html>
======

main.aspx :
========
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Frameset </title>
</head>
<body>
<a href="someother .aspx" target="main">S ome other ASPX page</a>
</body>
</html>
=======

That's it!

You can place links to any *.aspx page in main.aspx, and they will be displayed
in the "main" frame without the filename being displayed in the browser!

You'll probably need to include some sort of navigation menu in all the pages linked to in
main.aspx.
You'll also need to include Page and Language directives if you need them.

That shouldn't be too hard of a job...


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"Matt" <md*****@sorviv e.DONT-SEND-SPAM.com> wrote in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
Juan,

I have never heard of this method nor ever seen it implemented. Where can I find more information
about it's use and how to implement it?

Thanks,

Matt
"Juan T. Llibre" <no***********@ nowhere.com> wrote in message
news:Ov******** ******@TK2MSFTN GP04.phx.gbl...
Gerry,

inherent to *every* question is the underlying metainfo
as to whether the answer sought is convenient or not.

That saves a lot of barking up the wrong trees,
and warns all readers about the pitfalls in proposed code.

In this case, implementing what you proposed would increase the server workload
by a large factor, reducing the throughput for the server where that "solution" is implemented.

Sorry, nothing personal, but the proposed answer,
though technically correct, is worthless as a solution.

In any case, it's much simpler to hide the aspx extension by using a frameset in which
the first frame has zero for its number of rows and all the content is written in the
second frame, with * specified in the default frameset for the number of its rows.

That will, effectively, hide the extension for the default page but won't overload the server.
All other pages are exposed as links which have the 2nd frame as their target.

This is an old HTML trick to hide page extensions, although it has nothing to do with ASP.NET.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"gerry" <ge**@nospam.no spam> wrote in message news:e4******** ******@TK2MSFTN GP02.phx.gbl... sure - but that wasn't the question being asked.
"Juan T. Llibre" <no***********@ nowhere.com> wrote in message
news:er******** ********@TK2MSF TNGP02.phx.gbl. ..
If you do that, I fear your site's throughput will sink.

What you are suggesting would increase the site's processing by at least

2-300%
which would reduce your site's throughput to 33% or 25% of what it should

handle.

For what ? For an esthetic "hide my extension" consideration ?

Thanks, but no thanks.

I value ASP.NET for its processing capability, which allows me to have

much
more throughput than comparable platforms...wit h a lot less programming

effort.

Hobbling my web server to satisfy an esthetic desire is pointless, imho.
Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"gerry" <ge**@nospam.no spam> wrote in message

news:Oq******** ******@TK2MSFTN GP04.phx.gbl...
configure iis to have all requests ( * ) handled by asp.net
configure the appropriate static resource handlers in your web.config -

.gif , .js , .css etc
in Application_Beg inRequest use url rewriting to send the remaining

requests to the proper handler

ie
requests for http://www.mysite.com sent to default.aspx
requests for http://www.mysite.com/products sent to products.aspx
requests for http://www.mysite.com/support sent to support.aspx
...
Gerry "Matt" <md*****@sorviv e.DONT-SEND-SPAM.com> wrote in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
Does anyone know how to hide the ASPX extension of web pages in ASP.Net

2.0?

Thanks,

Matt


May 21 '06 #13
re:
Do you know if using master pages with this methods would cause any issues?
You can't have it all, Matt.

Master Pages and Frames serve, basically, the same purpose.
It's one or the other.

Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"Matt" <md*****@sorviv e.DONT-SEND-SPAM.com> wrote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
Juan,

Thanks a bunch! I will definitely look into doing this. Do you know if using master pages with
this methods would cause any issues?

Thanks again,

Matt
"Juan T. Llibre" <no***********@ nowhere.com> wrote in message
news:uR******** ******@TK2MSFTN GP04.phx.gbl...
re: I have never heard of this method nor ever seen it implemented.
Where can I find more information about it's use and how to implement it?
That method not only hides the extension, it hides the whole filename!

It's quite simple :

default.aspx :
=========
<html>
<head>
<title>Main</title>
</head>
<frameset rows="0,*">
<frame name="a" scrolling="no" noresize="nores ize" target="main" src="a.aspx">
<frameset cols="*">
<frame name="main" src="main.aspx" >
</frameset>
<noframes>
<body>
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
</frameset>
</html>
======

main.aspx :
========
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Frameset </title>
</head>
<body>
<a href="someother .aspx" target="main">S ome other ASPX page</a>
</body>
</html>
=======

That's it!

You can place links to any *.aspx page in main.aspx, and they will be displayed
in the "main" frame without the filename being displayed in the browser!

You'll probably need to include some sort of navigation menu in all the pages linked to in
main.aspx.
You'll also need to include Page and Language directives if you need them.

That shouldn't be too hard of a job...


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"Matt" <md*****@sorviv e.DONT-SEND-SPAM.com> wrote in message
news:%2******** ********@TK2MSF TNGP04.phx.gbl. ..
Juan,

I have never heard of this method nor ever seen it implemented. Where can I find more information
about it's use and how to implement it?

Thanks,

Matt
"Juan T. Llibre" <no***********@ nowhere.com> wrote in message
news:Ov******** ******@TK2MSFTN GP04.phx.gbl...
Gerry,

inherent to *every* question is the underlying metainfo
as to whether the answer sought is convenient or not.

That saves a lot of barking up the wrong trees,
and warns all readers about the pitfalls in proposed code.

In this case, implementing what you proposed would increase the server workload
by a large factor, reducing the throughput for the server where that "solution" is implemented.

Sorry, nothing personal, but the proposed answer,
though technically correct, is worthless as a solution.

In any case, it's much simpler to hide the aspx extension by using a frameset in which
the first frame has zero for its number of rows and all the content is written in the
second frame, with * specified in the default frameset for the number of its rows.

That will, effectively, hide the extension for the default page but won't overload the server.
All other pages are exposed as links which have the 2nd frame as their target.

This is an old HTML trick to hide page extensions, although it has nothing to do with ASP.NET.


Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"gerry" <ge**@nospam.no spam> wrote in message news:e4******** ******@TK2MSFTN GP02.phx.gbl... sure - but that wasn't the question being asked.
"Juan T. Llibre" <no***********@ nowhere.com> wrote in message
news:er******** ********@TK2MSF TNGP02.phx.gbl. ..
If you do that, I fear your site's throughput will sink.

What you are suggesting would increase the site's processing by at least

2-300%
which would reduce your site's throughput to 33% or 25% of what it should

handle.

For what ? For an esthetic "hide my extension" consideration ?

Thanks, but no thanks.

I value ASP.NET for its processing capability, which allows me to have

much
more throughput than comparable platforms...wit h a lot less programming

effort.

Hobbling my web server to satisfy an esthetic desire is pointless, imho.
Juan T. Llibre, asp.net MVP
aspnetfaq.com : http://www.aspnetfaq.com/
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
=============== =============== =====
"gerry" <ge**@nospam.no spam> wrote in message

news:Oq******** ******@TK2MSFTN GP04.phx.gbl...
configure iis to have all requests ( * ) handled by asp.net
configure the appropriate static resource handlers in your web.config -

.gif , .js , .css etc
in Application_Beg inRequest use url rewriting to send the remaining

requests to the proper handler

ie
requests for http://www.mysite.com sent to default.aspx
requests for http://www.mysite.com/products sent to products.aspx
requests for http://www.mysite.com/support sent to support.aspx
...
Gerry "Matt" <md*****@sorviv e.DONT-SEND-SPAM.com> wrote in message
news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
Does anyone know how to hide the ASPX extension of web pages in ASP.Net

2.0?

Thanks,

Matt



May 21 '06 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
1473
by: Shaul Feldman | last post by:
Hello, the question is how can I masquerade ASPX files behind HTML extension? Thank you in advance. -- With the best wishes, Shaul Feldman
3
2907
by: Christopher Baldwin | last post by:
Hello, Using ASP.NET v2.0.40607.42, I'm attempting to create a new file extension that should be handled exactly like "aspx" pages. For example, I just want to rename an aspx page from "test.aspx" to "test.extx", where .extx extensions are handled in exactly the same way as aspx pages. In pre-2.0 versions of ASP.NET, simply adding a HttpHandler element (below) to web.config, and adding a IIS mapping of "extx" to
9
1717
by: Rena | last post by:
Hi all, I would like to know if there are any way to hide the xxxx.aspx on my URL on server-side to avoid anonymous knowing i am using ASP. Net ? Thanks a lot.
2
3503
by: hn | last post by:
Hi, Is it possible to hide the aspx extension in the URL displayed on the address bar?
5
422
by: Matt | last post by:
I currently have a client that is okay with us using Microsoft development products but do not want their customers to see the aspx extension on any of the web pages. I played around with creating an HTTPHandler that masks the fact that the URL's are not aspx pages. I wonder if anyone else has come across this and would like express a better solution or one that is available to make sure I cover all the bases with doing this. Thanks, ...
24
2758
by: John Rivers | last post by:
ASPX which means ASPX pages, the code-behind concept, User Controls, Web Controls etc. is very poorly designed and makes it extremely hard to develop professional quality web applications. ASPX is Microsoft's attempt to "dumb down" web application development to help unskilled developers such as web design agencies achieve some results. For high quality applications IHttpHandlers are the way to go.
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10156
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10007
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9951
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9832
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8831
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7375
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5419
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3531
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.