CodeIgniter Forums
[SOLVED] Can't get Wordpress to work in subdirectory - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: [SOLVED] Can't get Wordpress to work in subdirectory (/showthread.php?tid=31473)



[SOLVED] Can't get Wordpress to work in subdirectory - El Forum - 06-21-2010

[eluser]daparky[/eluser]
Hi there,

I can't get Wordpress to work in a subdirectory of my CI installation. Here's my HTACCESS in the root:-

Code:
<IfModule mod_rewrite.c>
Options +FollowSymlinks
    RewriteEngine On
    RewriteBase /

    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]
    
    RewriteCond %{REQUEST_URI} ^application.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond $1 !^(blog)
    RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    ErrorDocument 404 /index.php
</IfModule>

And here's the HTACCESS in the /blog/ directory:-

Code:
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>

I keep getting a 404 error when going to /blog/

Any help would be much appreciated.


[SOLVED] Can't get Wordpress to work in subdirectory - El Forum - 06-21-2010

[eluser]daparky[/eluser]
I've solved this issue, same HTACCESS's as above, i had set the Wordpress site url to http://domain/ instead of http://domain/blog/.

My bad.