There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot bsod computer connection cpu crash css dell desktop dma driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware monitor motherboard network networking outlook outlook 2003 outlook 2007 outlook express pio problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
Web Design & Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Internet & Networking > Web Design & Development >
URLs without the file extension


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
nightqueen's Avatar
Member with 57 posts.
 
Join Date: Jul 2004
Location: England
Experience: Intermediate
07-Nov-2007, 11:14 AM #1
URLs without the file extension
Hi

Does anyone know how to direct a user to the correct file when they don't enter the file extension into the address bar?

e.g. If the user inputs www.stoneycove.com/nemos then the browser will show up the page www.stoneycove.com/nemos.asp

Last edited by nightqueen : 07-Nov-2007 11:24 AM.
Elvandil's Avatar
Moderator with 29,274 posts.
 
Join Date: Aug 2003
Location: Vermont
07-Nov-2007, 11:42 AM #2
Could you do a redirect from index.htm when the typed address was not found? That would redirect to the same page for all mistyped url's, of course.
Fyzbo's Avatar
Senior Member with 1,767 posts.
 
Join Date: Feb 2002
Location: North Carolina, USA
Experience: Programming-Advanced|EVER
07-Nov-2007, 01:50 PM #3
I am assuming from the asp extension that you are using classic asp.

You may be able to find an isapi filter for iis to redirect the links, but it will most likely be difficult. www.stoneycove.com/nemos actually points to the folder nemos in the root of the website. If you were to create that folder iis would show the default page in that folder, often default.asp, default.html, etc.
MMJ's Avatar
MMJ MMJ is offline
Distinguished Member with 3,208 posts.
 
Join Date: Oct 2006
08-Nov-2007, 12:08 PM #4
Make a file called nemos, than make an ajax request to nemos.asp. not very clean but it works.
tomdkat's Avatar
Computer Specs
Distinguished Member with 3,515 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
08-Nov-2007, 03:49 PM #5
Quote:
Originally Posted by MMJ
Make a file called nemos, than make an ajax request to nemos.asp. not very clean but it works.
Why an AJAX request vs a META page redirect or something like that?

Peace...
MMJ's Avatar
MMJ MMJ is offline
Distinguished Member with 3,208 posts.
 
Join Date: Oct 2006
09-Nov-2007, 06:38 AM #6
Quote:
Originally Posted by tomdkat
Why an AJAX request vs a META page redirect or something like that?

Peace...
Yeah, that makes more sense but if he wants to make it so that the url doesn't show the file extension as said in the thread title.
namenotfound's Avatar
Computer Specs
Distinguished Member with 2,108 posts.
 
Join Date: Apr 2005
Location: New York
Experience: I know what I know, I am
09-Nov-2007, 07:19 AM #7
Quote:
Originally Posted by tomdkat
Why an AJAX request vs a META page redirect or something like that?

Peace...
META redirects can "break" the back button.
MMJ's Avatar
MMJ MMJ is offline
Distinguished Member with 3,208 posts.
 
Join Date: Oct 2006
09-Nov-2007, 08:37 AM #8
Quote:
Originally Posted by namenotfound
META redirects can "break" the back button.
They do break the back button but in this case I think it would be preferable if it did break.
tomdkat's Avatar
Computer Specs
Distinguished Member with 3,515 posts.
 
Join Date: May 2006
Location: S.F. Bay Area, CA
Experience: Intermediate
09-Nov-2007, 11:42 AM #9
Quote:
Originally Posted by MMJ
Yeah, that makes more sense but if he wants to make it so that the url doesn't show the file extension as said in the thread title.
Hmmm, I didn't get that from the description of the issue and the thread title could refer to URLs entered without a file extension in addition to intentionally not wanting to display the file extension in the URL for the loaded page, as you have indicated.

I read the issue as the user specifies a URL of http://www.blah.com/page and a "not found" is probably returned instead of page.[whatever extension is desired] being returned.

Peace...
nightqueen's Avatar
Member with 57 posts.
 
Join Date: Jul 2004
Location: England
Experience: Intermediate
12-Nov-2007, 04:31 AM #10
Thanks for all your input. I should probably have explained it all a bit better in the first place. Displaying the default page in a folder is probably the most simple way for me to achieve what I want as it's only the 'homepage of the subpages' I want the shortened URL for.

Thanks :-).
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 09:31 AM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.