0

I have wordpress installed in a subfolder and using permalinks but I'm getting a blank page when I try to access to any post.

This is what I have in the root folder .htaccess:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?site.com$
RewriteCond %{REQUEST_URI} !^/wordpress/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /wordpress/$1
RewriteCond %{HTTP_HOST} ^(www.)?site.com$
RewriteRule ^(/)?$ wordpress/index.php [L]

And this is what wordpress put in the subfolder .htaccess:

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

# END WordPress

I'm using custom permalinks with /%postname%.html, the posts have the permalink correctly but when I try to access it shows only an empty blank page.

5
  • what happens when you remove root .htaccess and just use the one in the subfolder? (as a test - i understand the root one is needed too) - I think the two are conflicting. Commented Feb 1, 2012 at 1:44
  • If I remove the .htaccess in root the domain just dont look for index in the root folder.
    – Shixons
    Commented Feb 1, 2012 at 2:04
  • did it worked BEFORE the permalik change ? did you configured the wp URL/folder and blog URL/folder in options ?
    – krembo99
    Commented Feb 1, 2012 at 4:12
  • The permalink was always working, the problem its the code in the root .htaccess to redirect to the subfolder.
    – Shixons
    Commented Feb 1, 2012 at 4:42
  • Do you want to show up your blog on main domain keeping all files in subdirectory ?
    – Amit Kosti
    Commented Jul 9, 2012 at 8:52

1 Answer 1

1

try using a blank htaccess file in your root folder and from there you can do a 301 redirect to your WP folder. i have had the same kind of issues with some hosts and always solved that way, it's not WP, it's always a faulty htaccess

3
  • ¿How I do 301 redirect?
    – Shixons
    Commented Feb 1, 2012 at 2:05
  • you can do it via your control panel or you can simply take a look at tamingthebeast.net/articles3/spiders-301-redirect.htm (since it depends on your site and there are several options)
    – Devin
    Commented Feb 1, 2012 at 2:09
  • I'm using cPanel and it say that I can't make a 301 redirect of the main domain.
    – Shixons
    Commented Feb 1, 2012 at 4:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.