Jump to:

3448 Posts in 1032 Topics by 873 members

Template Questions

SilverStripe Forums » Template Questions » template for Security not found

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

Page: 1
Go to End
Author Topic: 520 Views
  • BenWu
    Avatar
    Community Member
    90 Posts

    template for Security not found Link to this post

    My customer found a horriable page http://mysite.com/Security

    and he got this error msg:
    [Notice] Undefined property: Security::$template
    GET /Security

    followed by 404.

    how to redirect /Security to the 404 specified in the CMS?

  • gaethofs
    Avatar
    Community Member
    9 Posts

    Re: template for Security not found Link to this post

    Did you modify or extend the default Controller.ss template?
    What version of SS are you currently using?

  • BenWu
    Avatar
    Community Member
    90 Posts

    Re: template for Security not found Link to this post

    I am using 3.0.2 release 2. I did not extend the default Controller.ss.

    For now, I have to put this in my .htaccess to force a redirect

    RewriteCond %{REQUEST_URI} ^/Security$
    RewriteRule ^(.*)$ /notfound/%1 [PT]
    RewriteCond %{REQUEST_URI} ^/Security/$
    RewriteRule ^(.*)$ /notfound/%1 [PT]

    520 Views
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.