21491 Posts in 5783 Topics by 2622 members
General Questions
SilverStripe Forums » General Questions » How to disable debug_profile and debug_memory outputs in live sites?
General questions about getting started with SilverStripe that don't fit in any of the categories above.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 969 Views |
-
How to disable debug_profile and debug_memory outputs in live sites?

4 February 2010 at 8:26am Last edited: 4 February 2010 8:27am
Is it possible to deactivate debug_* outputs on live sites?
Even on silverstripe.org you can take a look behind:
http://www.silverstripe.org/?debug_profile
http://www.silverstripe.org/?debug_memory=1drx
-
Re: How to disable debug_profile and debug_memory outputs in live sites?

4 February 2010 at 2:10pm
Hi drx,
Here is a quick solution to do what you want using a rewrite rule within the .htacess;
RewriteCond %{QUERY_STRING} ^debug(.*)
RewriteRule (.*) http://example.com/silverstripe/404? [R=301,L]Chuck these two lines in after the RewriteBase and any requests with a query string of debug will get redirected to example.com/silverstripe/404.
Hope that helps.
Cheers
Owen -
Re: How to disable debug_profile and debug_memory outputs in live sites?

5 February 2010 at 3:02am
hi owen - nice *workaround*.
that helps.
drx -
Re: How to disable debug_profile and debug_memory outputs in live sites?

5 February 2010 at 8:05am
Btw, in 2.4 both features will be dev site only.
| 969 Views | ||
|
Page:
1
|
Go to Top |


