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?
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
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?
Did you modify or extend the default Controller.ss template?
What version of SS are you currently using?
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]