Set PHP Include Path in htaccess
December 26th, 2008
If you do not want to change the include_path directories (or you don’t have access to php.ini) you can still set the include_path value within your root .htaccess file.
Update/Create /doc_root/.htaccess
Unix/Linux Servers
php_value include_path "/path/to/include"
Windows Servers
php_value include_path "C:/path/to/include"
PHP
To call the include within PHP do the following:
require_once('file.php');
The file above is in /doc_root/include/file.php
Options
Multiple include directories
If you have multiple include [...]
Remove/Force www on Your Domain and 301 Redirect
December 18th, 2008
You want to ensure that Google and other SEs only see one domain so you don’t penalized for duplicate content (www and non-www indexed pages are not the same and counted as duplicates).
.htaccess
To redirect to domain.com and 301 existing pages:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC]
RewriteRule ^(.*)$ http://domain.com/$1 [R=301,L]
To redirect to www.domain.com and 301 existing pages:
RewriteEngine [...]
Create a Custom Wordpress Page
November 20th, 2008
Here is how you can add a custom page to Wordpress. This is useful if you want to create a page that uses your own code for a custom function and you want to use the template you have installed on your Wordpress blog.
So let’s get to it…
Create your custom page
For this example, <doc root>/test.php.
<?php
define('WP_USE_THEMES', [...]









