Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] Can't get Wordpress to work in subdirectory
#1

[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.
#2

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




Theme © iAndrew 2016 - Forum software by © MyBB