Jump to content

404 Page help.


Jacbey

Recommended Posts

Hi,

 

My question is actually not so much to do with php but anyway. I want to make a 404 page that doesn't redirect. So say for example, I go to www.mysite.com/eurgire and this was invalid it wouldn't go to www.mysite.com/404.html it would stay as www.mysite.com/eurgire but display a 404 message. How would I go about doing this?

 

Thanks in advance,

 

Jacob.

Link to comment
https://forums.phpfreaks.com/topic/254311-404-page-help/
Share on other sites

while for me  anytime a user types in a wrong link for explame they type in google.com/web it would just stay there and should the error

 

That isn't the default Apache behavior.

 

This is usually done by routing everything through the index.php file. By doing this, pages are never technically "not found", since the index.php file exists. Therefore you can have the functionality you are looking for and force 404 headers when something is "not found".

Link to comment
https://forums.phpfreaks.com/topic/254311-404-page-help/#findComment-1303989
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.