• Toll-free  888-665-8637
  • International  +1 717-220-0012
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

professorFrink
#1 Posted : Saturday, May 5, 2007 9:04:28 AM(UTC)
professorFrink

Rank: Member

Joined: 12/19/2006(UTC)
Posts: 20

I love this feature...

But a question, how flexible is it? In playing with the demo, I was able to define a custom path to a .aspx page, but is it possible to do have a url without an extension? In transitioning my current site to this, I'm looking for a way to use my existing url structure which does not have an extension. This did not seem to work in the demo environment.

So, what I'm looking for is something like www.mysite.com/category/product (instead of www.mysite.com/category/product.aspx). If this is not supported out of box, does anyone have any creative suggestions on how this might be accomplished? I'm thinking of setting it to www.mysite.com/category/product/default.aspx and just making sure default.aspx is defined as the default page in IIS, and create the links without the default (somehow).

I'm taking a good serious look at the demo again, so I'm sure I'll have more questions as I come across them, thanks!
Andy Miller
#2 Posted : Saturday, May 5, 2007 3:27:57 PM(UTC)
Andy Miller

Rank: Member

Joined: 11/5/2003(UTC)
Posts: 2,136

Was thanked: 1 time(s) in 1 post(s)
Internet Information Server (the web server software) uses the file extension to figure out which IIS extension is responsible for the request. For example if the URL ends with *.aspx then IIS will send the request to ASP.NET. Requests that have no file extension are handled by IIS internally. That is why requests for http://mysite.com/category/product are not handled by the URL rewriting feature in BVC5...the request is never even sent to ASP.NET.

If you have access to the server (or some sophisticated control panel) then you can configure IIS to forward all requests to ASP.NET. If you do that, then BVC5 will see the request for http://mysite.com/category/product and you can rewrite it to a custom page.
Andy Miller
Structured Solutions

Shipper 3 - High Velocity Shipment Processing
SStorhaug
#3 Posted : Monday, August 6, 2007 10:07:45 PM(UTC)
SStorhaug

Rank: Member

Joined: 11/20/2005(UTC)
Posts: 122

A tip:

If you use a page called Default.aspx in the directory, the request will be forwarded to ASP.NET automatically. You simply ensure every virtual directory that is specified in your fictitious URL structure physically exists on your site, and add a blank Default.aspx page to the each directory.

A good resource for URL Rewriting can be found here:
http://msdn2.microsoft.c...us/library/ms972974.aspx
Marcus
#4 Posted : Tuesday, August 7, 2007 10:21:55 AM(UTC)
Marcus

Rank: Member

Joined: 11/5/2003(UTC)
Posts: 1,786

The URLs need the .aspx extension unless you configure IIS to process all requests through asp.net. The downside to using asp.net to process all requests is that requests for static text, images, etc. will be slower than just letting IIS handle them.
SStorhaug
#5 Posted : Tuesday, August 7, 2007 2:32:45 PM(UTC)
SStorhaug

Rank: Member

Joined: 11/20/2005(UTC)
Posts: 122

Marcus,

I wasn't referring to using ASP.NET to handle all requests. Let me give you an example.

Say you want to use the visible URL to in the browser to be:

http://www.mysite.com/Products/Accessories/Thing

When this request comes in, by default IIS will try to find a default.aspx page that exists in a virtual directory named /Products/Accessories/Thing. If you physically create the virtual directory on the server and put a default.aspx page in the directory, the request will be forwarded to ASP.NET by IIS and the URL rewriting will work even though you didn't use a .aspx extension in your fictitious URL.
Marcus
#6 Posted : Tuesday, August 7, 2007 2:33:41 PM(UTC)
Marcus

Rank: Member

Joined: 11/5/2003(UTC)
Posts: 1,786

Yes, you are correct that will work but only if you physically create that folder and the default.aspx file on your server. It will not work if you just use it in a URL without actually creating the file.
scott.mech
#7 Posted : Wednesday, August 8, 2007 11:04:09 AM(UTC)
scott.mech

Rank: Member

Joined: 4/4/2004(UTC)
Posts: 670

We use ISAPI_Rewrite to get around a lot of these issues. IIS7 supports extensionless URL Rewriting.

Scott Mech
[email protected]
bigheadrob
#8 Posted : Friday, August 10, 2007 9:58:05 AM(UTC)
bigheadrob

Rank: Member

Joined: 5/17/2004(UTC)
Posts: 456

Sorry if stupid question here....why would you NOT want an extension to display on the web? What benefit is this? Or what does it help you solve or do?
scott.mech
#9 Posted : Tuesday, August 21, 2007 3:49:16 PM(UTC)
scott.mech

Rank: Member

Joined: 4/4/2004(UTC)
Posts: 670

BigHeadRob,
There are plenty of reasons why you would do this. Take a look at myspace. The site runs a lot of asp.net, but you will find Coldfusion .cfm extensions on some of the same URLS.

Scott Mech
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

©2025 Develisys. All rights reserved.
  • Toll-free  888-665-8637
  • International  +1 717-220-0012