Concentric, Permalinks & You
-
If you’re using Concentric/XO to host your WordPress blog then this post is for you. Follow these steps before you attempt to install WordPress for the first time. If you have already installed it, start over.
To get Permalinks working you need to create a .htaccess file, WordPress can’t do this automatically on this host. Here is what the basic .htaccess file should look like:
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]Make sure you create this file using an editor that allows for unix formatting (like PSPad), using notepad will give you a parsing error – it has something to do with invisible end of file characters. Make sure the last rule has a hard return after it, it’s required. .htaccess files are cached for up to 15 minutes so you may have to wait for it to kick in.
Next you’ll need to edit your wp-settings.php file so open that up in your editor. Add the following code right above the closing ?> php tag:
if(isset($_REQUEST['q'])) { $_SERVER['REQUEST_URI'] = "/" . $_REQUEST["q"]; }else{ if (empty($_SERVER['QUERY_STRING'])) { $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME']; } else { $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] . "?" . $_SERVER['QUERY_STRING']; } }
If someone can write that block of code more cleanly feel free, I’m not an expert PHP programmer.
Once that block of code is in place you can proceed to run the install.
Now that WordPress is installed you’ll have to do one more thing before you can start blogging:
Create a new file called: disable-canonical-redirects.php and upload it to the wp-content/plugins directory.
Drop this block of code into that file:
<?php /* Plugin Name: Disable Canonical URL Redirection Description: Disables the "Canonical URL Redirect" features of WordPress 2.3 and above. Version: 1.0 Author: Mark Jaquith Author URI: https://markjaquith.com/ */ remove_filter('template_redirect', 'redirect_canonical'); ?>
Now you need to enable that plugin, go to the Admin login page:
example.com/wp-loginEnable the plugin you created.
Happy blogging!
- The topic ‘Concentric, Permalinks & You’ is closed to new replies.