Jump to content

Multiple 404 page not found for one domain


doc1355

Recommended Posts

I'm trying to write a script to do the following, but I don't know how to start:

I will be generating some links on my page automatically that they point to 123456.pdf. The file name will be variable and my original script will create this variable for me. So, I will have 123456.pdf, 123457.pdf, 123987.pdf and so on. These links are suppose to point to its specific pdf file. However, some files may be missing. In this case the link will go to my general 404 page error.

I want to be able to have a unique 404 page error only for these links. All these pdf files will be located in same directory. I was thinking may be this could be done by a htaccess redirect command or by a php script.

The way this should work is that the link points to a specific file. If the file exists, it will load. If the file does not exist it should redirect to my unique 404 page (not my general 404 page).

 

 

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.