17452 Posts in 4473 Topics by 1971 members
|Go to End|
21 January 2008 at 1:40pm Last edited: 21 January 2008 1:43pm
I've noticed over the past month using SilverStripe that my error_log is filling up with 404 errors, mostly associated with things like this:
(I should mention that SilverStripe is installed at the root level of my web site, ie: right in public_html, not a subfolder like /cms/)
So I added the following rules to my .htaccess, and the errors went away:
Obviously, if you installed SilverStripe under a root folder like /cms/ you'd change the rules to be something more like:
RewriteRule cms/(.*)/jsparty/(.*) http://mydomain.com/cms/jsparty/$2 [L]
RewriteRule cms/(.*)/blog/(.*) http://mydomain.com/cms/blog/$2 [L]
RewriteRule cms/(.*)/themes/(.*) http://mydomain.com/cms/themes/$2 [L]
After tracing through much of the code, I see where a few calls to the Requirements class are using a variable like this:
but most times not:
So it seemed the only way to correct this behavior was via .htaccess, and my fix as mentioned above seems to be working quite well.
Still, it raises the issue of why the blog widget doesn't account for the article name when looking for the /jsparty/ or /blog/ paths for other elements.
Can anyone think of a non-htaccess way to solve this in the code?
|Go to Top|