Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

How to disable debug_profile and debug_memory outputs in live sites?


Reply


5 Posts   1192 Views

Avatar
drx

Community Member, 7 Posts

4 February 2010 at 8:26am

Edited: 04/02/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=1

drx

Avatar
OwenW

Community Member, 45 Posts

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

Avatar
drx

Community Member, 7 Posts

5 February 2010 at 3:02am

hi owen - nice *workaround*.
that helps.
drx

Avatar
Hamish

Community Member, 712 Posts

5 February 2010 at 7:55am

Refer also:

[url]http://groups.google.com/group/silverstripe-dev/browse_thread/thread/d1a61dd53c6aff46[/url]

Avatar
Hamish

Community Member, 712 Posts

5 February 2010 at 8:05am

Btw, in 2.4 both features will be dev site only.