cancel
Showing results for 
Search instead for 
Did you mean: 

How do I make a 404 page with plusnet webspace

B737
Hooked
Posts: 5
Registered: ‎24-12-2020

How do I make a 404 page with plusnet webspace

Hi, I have got a website running in the Plusnet webspace that I originally got with my Freenetname account back in 1999! Out of curiosity I ran a website checker service across my site and it suggested that I setup a 404 page. I can write the page OK but how and where do I upload it so that it will work?

9 REPLIES 9
shutter
Community Veteran
Posts: 22,214
Thanks: 3,773
Fixes: 65
Registered: ‎06-11-2007

Re: How do I make a 404 page with plusnet webspace

Strangely, I thought that a 404 error notice was generated by the server/search engine, when it could not find the URL pointed to....   Undecided

 

 

 

But there again... What do I know ? ? ? ?  not a lot ! !  Huh

B737
Hooked
Posts: 5
Registered: ‎24-12-2020

Re: How do I make a 404 page with plusnet webspace

It is usually generated by the server admins but you can make your own 404 page. I was wondering how with plusnet.
Mook
Seasoned Champion
Posts: 1,266
Thanks: 870
Fixes: 9
Registered: ‎27-12-2019

Re: How do I make a 404 page with plusnet webspace

@B737 I assume that Plusnet uses Apache? If they do then:

Create your page the using your editor of choice and store it the document root for the server e.g. /var/www/html/my404.html

Modify your apache conf file and for the server or virtual host add the following :

 

// Set page redirection
ErrorDocument 404 /my404.html

// Prevent page from being requested directly
<Files "my404.html">
    <If "-z %{ENV:REDIRECT_STATUS}">
        RedirectMatch 404 ^/my404.html$
    </If>
</Files>

You can add the above for each custom page you create e.g. 500, 502-4 this isn't limited to 404.

B737
Hooked
Posts: 5
Registered: ‎24-12-2020

Re: How do I make a 404 page with plusnet webspace

@Mook Thats great info but I get stuck at modifying the Apache config file. I dont know where to find it or if I can change it. With Plusnet webspace the only area we get access to is /public_html/ and these contain the files we upload for our websites. I guess my question is within the area I can acess is there any way I can get the Plusnet (Apache?) server to point to a page of my choice in the event of a "404 page not found error" For one thing I would put the google analytics code on it to see how often it was happening and where from etc.

Mook
Seasoned Champion
Posts: 1,266
Thanks: 870
Fixes: 9
Registered: ‎27-12-2019

Re: How do I make a 404 page with plusnet webspace

Now that I can't answer @B737 but there are others on here that may have the information you need but you may need to wait until tomorrow for a reply.

B737
Hooked
Posts: 5
Registered: ‎24-12-2020

Re: How do I make a 404 page with plusnet webspace

@Mook 

I have uploaded a .htaccess file with the following line

ErrorDocument 404 /404page.htm

Where 404page.htm was the 404 page I wrote but it still didnt work.

Mook
Seasoned Champion
Posts: 1,266
Thanks: 870
Fixes: 9
Registered: ‎27-12-2019

Re: How do I make a 404 page with plusnet webspace

@B737 Add :

AllowOverride FileInfo

To your .htaccess file. 

B737
Hooked
Posts: 5
Registered: ‎24-12-2020

Re: How do I make a 404 page with plusnet webspace

I tried adding that line but it still didn't work.

Any more ideas?

Mook
Seasoned Champion
Posts: 1,266
Thanks: 870
Fixes: 9
Registered: ‎27-12-2019

Re: How do I make a 404 page with plusnet webspace

You have to restart the Web Server for these changes to take effect so you'll need to find out how this is done in your environment @B737.