Archive for the ‘Tips’ Category

Tip: Skip all RewriteRules on a sub-request in Apache

To have Apache mod_rewrite skip processing all rules during a sub-request you could add a NS (no sub-request) flag to each rule. Or, you could just make this the first rule:

RewriteCond %{IS_SUBREQ} true
RewriteRule .* – [L]

Tip: Don’t use spaces or dashes in WordPress theme folders

Ever wonder why the theme preview for some themes shows up blank in WordPress even though upon activation the theme works as just fine? This is because using spaces and/or dashes in WordPress theme folder names breaks WordPress’ theme preview functionality, so you should only use underscores.

Tip: Use PHP_SELF and mod_rewrite without using .htaccess

Want to use your favorite PHP framework without it’s .htaccess file by moving those settings into your httpd.conf but it’s not quite working out? This is probably because some of those settings in the .htaccess file are rewrites and the PHP framework you are using uses a front controller that relies on the PHP_SELF server [...]

Tip: Turn PHP output_buffering off when using Elgg

I created a comment plugin for Elgg 1.2 with AJAX effects, but it wouldn’t load the return value from the form submission properly—it would load the entire dashboard page. For some reason Elgg was outputting the location http header causing a redirect. The solution? Set PHP’s output_buffering setting to ‘off’.

Tip: How to remove a user from Google AdSense

If you want to remove a user from the My Account -> Account Access screen of AdSense and there are no Actions available, you likely have a linked AdWords account and will need to do it there. Go to the My Account -> Access screen of AdWords and click on the Terminate access link next [...]

Subscribe to RSS Feed Follow me on Twitter!