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.

We've moved the forum!

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.

General Questions /

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

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

How to disable debug_profile and debug_memory outputs in live sites?


Go to End


5 Posts   2114 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

Avatar
Hamish

Community Member, 712 Posts

5 February 2010 at 8:05am

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