Jump to:

1383 Posts in 492 Topics by 521 members


SilverStripe Forums » Themes » Creating Forbidden Error Page

Discuss SilverStripe Themes.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 747 Views
  • UKBadger
    Community Member
    3 Posts

    Creating Forbidden Error Page Link to this post


    (Using SimpleStripe theme)

    I've created a Forbidden error page and it successfully saves and publishes, and I can see the error-403.html file in the .../silverstripe/assets folder.

    Problem is is that the error-403.html file that has been saved is just a blank html file.

    Any idea what could be causing this, and how to fix it?


  • martimiz
    Forum Moderator
    1086 Posts

    Re: Creating Forbidden Error Page Link to this post

    I've seen that too... For the moment I don't think it can be fixed.

    When SilverStripe calls the 403 errorpage, a blank page is returned, and that's what's written to the static file in assets as well... It has something to do with the ErrorPage_Controller::init() method setting the error status to 403 for this errorpage - and I somehow guess that it is now forbidden to SilverStripe as well

    I suppose what you could do is copy the contents of one of the other error pages in assets, and tweek the html. Then add the custom errorpage to .htaccess...

  • UKBadger
    Community Member
    3 Posts

    Re: Creating Forbidden Error Page Link to this post

    Hi Martinez

    Thanks for the reply

    For now I've copied the code that the 'Page not found' error-404.html file contents into the blank error-403.html file, changed the wording and it now works correctly, i.e. I get the forbidden page displayed within my website design.

    I also added the reference in the .../silverstripe/.htaccess file. (ErrorDocument 403 /assets/error-403.html)

    Just another thing to remember I've 'fixed' in the future.


Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.