Jump to content

[SOLVED] Force error 404 when querystring match not found


Recommended Posts

I have a page artist.php?artistName=name

I rewrite the url for this page so it looks like this:

http://localhost/greckle/artist/James-Tucker-Band/

 

When they click on a page I take the artistName and match it against the database.

Is there a way to make the page say Error 404 Page not found when the artistName doesn't match?

 

In other words, when I run the query select * from artist where artistName = artistname

 

if it doesn't match any records, is there a way to make the official error 404 page show instead of creating one that looks like it?

 

or should I just create one that looks like it?

 

thanks

 

 

 

Really you need to create a nice error message, As a user might think your web site is down,

or even your web site is crap, Be careful not everyone, No what the error messages mean..

 

So in essence create a nice error message with your header and footer included.....

Really you need to create a nice error message, As a user might think your web site is down,

or even your web site is crap, Be careful not everyone, No what the error messages mean..

 

So in essence create a nice error message with your header and footer included.....

 

Oh yeah...Good point.  So you think I should just say artist not found.....

 

thanks guys.

 

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.