[wp-hackers] Using pretty permalinks when Wordpress is in a different directory

Christian Gundersson gundersson at gmail.com
Wed May 5 09:08:08 UTC 2010


Hi,

I have a WP site where the index.php file resides in the webservers root
directory and the wordpress installation has been put in a subdirectory to
that called 'blog'.

The site works fine using the traditional ugly links 'index.php?page_id=n'.
When i try and convert over to using pretty permalinks all i get when I try
and access one of the pages is that "The page cannot be found". Not
Wordpress own '404' page but the webservers resonse. I'm using the WP
generated .htaccessfile below and WP 2.9.2. I couldn't find any answer to
this question on the web and the WP Codex didn't touch on the subject, why
I'm turning to you guys for help.

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

(I tried to change the RewriteBase to both 'blog/' and '/blog/' but that
didn't help either.)

Thanks!

//Christian


More information about the wp-hackers mailing list