I want to make a custom 404 error page since we are upgrading some products and new pages are available. HAs anyone done that in Freeway? Or does it have to be hard coded?
No problem making the page - but when the 404 error appears, how does the server get to recognize the 404 error? In other words, is it just the way you name the page or where I place it on the server? I’m a little dense on this…
To have your 404 error page displayed you have to tell the server what to do when it recognises there is an error.
This is how i do it, and perhaps there are others that can tell you differently.
You will need an ftp client or a file manager on your hosting account.
Log in to your hosting and if you don’t already have a .htaccess file at the route of your directory, add one. To do this simply create a plain text file called htaccess.txt - upload this to the route of your web account [ normally the first folder that is open ] and rename it to .htaccess If you add the ‘dot’ before you upload. it will become invisible, although ftp apps like transmit will still see it where ever you saved it, but it’s best not to rename until it is on the server.
Open the .htaccess file and add the code:
ErrorDocument 404 /myerrorpage.html or whatever you have named the page you created in freeway, and save it.
Whenever a missing or incorrectly typed page is requested, your error page will be displayed.
I have in the past needed to add the full url of the page ie: ErrorDocument 404 /http://www.mysite.com/myerrorpage.html but usually the first method is fine.
Hope that helps.