fredag, mars 05, 2010

How to use Wordpress together with phpLD (PHP Link Directory)

I had a problem trying to host a Wordpress blog on the same domain as PHP Link Directory.
When I tried to use search engine friendly URLs (permalinks) on both Wordpress and phpLD the URLs wasn't corretly redirected. It did work if I didn't use SEF URLs on Wordpress.

To solve this problem I had to create (change if you already have one) a .htaccess file in the directory my Wordpress installation was placed.

Example:
Your link directory is placed in the root: http://www.rootphpld.com/
Your Wordpress blogg is placed in the "blog" directory: http://www.rootphpld.com/blog/

In the "blog" directory you put the .htaccess file with the following information (If WordPress installed in a subdirectory called "blog". Change blog to whatever the namn is of your blog directory) :
# BEGIN WordPress

RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]

# END WordPress

Inga kommentarer: