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 [...]
Apache WAMP vhost with SSL Configuration
November 28th, 2008
If you are developing in a Windows environment and need to host multiple sites on your Apache development workstation or server here are some tips for setting up your Apache configuration.
Download and install XAMPP
http://www.apachefriends.org/en/xampp-windows.html
Verify apache is running after installation
<a href="http://localhost" target="_blank">http://localhost</a>
NOTE: If you are also running IIS you will need to disable socket pooling that [...]









