473,387 Members | 1,864 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Need help with custom 404 asp page

I created my own custom 404 handler and it works, so when I put in

http://www.domain.com/badxxx.html
it produces the correct 404 error and you see
http://www.domain.com/badxxx.html in the url still which is fine.

But when I put in
http://www.domain.com/asdf

it redirects to
http://www.domain.com/index.html

it gives a 302 (moved temporarily) as well as the 404 error.
Why does it do this for not .html files? I dont redirect it at all, and am
using
thestring = Request.ServerVariables("QUERY_STRING") to get the url

but thestring sometimes does not display the asdf depending what I do after
this command, very odd.

does anybody have anyideas as to how to preserve this
http://www.domain.com/asdf in the url and avoid the 302?

Thanks
Dec 27 '05 #1
1 1417
You need an ISAPI URL re-write ;o)

http://aspfaq.com/show.asp?id=2162

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

"Julie" <ju****@optonline.net> wrote in message
news:jY*****************@newsread2.news.atl.earthl ink.net...
I created my own custom 404 handler and it works, so when I put in

http://www.domain.com/badxxx.html
it produces the correct 404 error and you see
http://www.domain.com/badxxx.html in the url still which is fine.

But when I put in
http://www.domain.com/asdf

it redirects to
http://www.domain.com/index.html

it gives a 302 (moved temporarily) as well as the 404 error.
Why does it do this for not .html files? I dont redirect it at all, and am using
thestring = Request.ServerVariables("QUERY_STRING") to get the url

but thestring sometimes does not display the asdf depending what I do after this command, very odd.

does anybody have anyideas as to how to preserve this
http://www.domain.com/asdf in the url and avoid the 302?

Thanks

Dec 28 '05 #2

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

Similar topics

0
by: Mike Pierson | last post by:
Hello all: I have a C# windows application that needs a custom calendar. I need this calendar displayed as a month view. I also need the ability to insert/manipulate images and text into each...
4
by: Phil | last post by:
k, here is my issue.. I have BLOB data in SQL that needs to be grabbed and made into a TIF file and placed on the client (could be in temp internet dir). The reason we need it in TIF format is...
1
by: noone | last post by:
I upgraded VS 2003 and asked my ISP (MaximumASP) to upgrade the server to net 1.1. That was two weeks ago and I am having a problem that will not go away. When publishing the site from VS I get an...
6
by: Scott Zabolotzky | last post by:
I'm trying to pass a custom object back and forth between forms. This custom object is pulled into the app using an external reference to an assembly DLL that was given to me by a co-worker. A...
4
by: Brie_Manakul | last post by:
I need to set up an if else to show different weather scripts based on the city selection they choose. Any help on this would be great. Thanks! <%@ page language="java" import="java.util.*,...
8
by: pamelafluente | last post by:
I am beginning aspNet, I know well win apps. Need a simple and schematic code example to start work. This is what I need to accomplish: ---------------------- Given button and a TextBox on a...
0
by: tekhneek | last post by:
I'm building a site for my family & friends to all keep in touch and the two features I'm coming to a halt about is this (in database design) I let users create their own pages (with a title and...
4
by: Suresh | last post by:
Is there any way to access the custom properties of a master page from the aspx form? I know the custom properties of a master page can be accessed from the aspx.cs partial class by specifying...
3
by: Rich Squid | last post by:
Hello Here's my basic problem: On my asp.net form page I have a DetailsView (default mode=edit) bound to a AccessDataSource control. Users can successfuly update a databound template field,...
2
by: Michal Valent | last post by:
I would like to fire some custom server control event before Page_Load event like this (from the trace of an aspx page) : Trace Information Category Message From First(s) From Last(s) aspx.page...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...

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.