Tagged Posts with: htaccess

Set PHP Include Path in htaccess

December 26th, 2008 | Posted in Apache, PHP
1

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 ...

Remove/Force www on Your Domain and 301 Redirect

December 18th, 2008 | Posted in Apache
0

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 ...

Create a Custom WordPress Page

November 20th, 2008 | Posted in Wordpress
1

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 ...