Forum Moderators: phranque
having a problem with current site where the blog won't load unless I leave it out
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
# END WordPress
Wouldn't the htaccess posted above only apply to the wordpress folder?
I checked the General Settings for the blog and the same blog address was set up for both the WP address AND the site address. The Blog is within the site (they are separate) so I removed the blog address from the site address (emptied cache and refreshed the web page) and I still had access to the main blog page via the link from website home page.
/wp will follow /htaccess for things like deny from and SetEnvIf instructions but doesn't follow rewrite rules out of the box. At least this has been my experience so far.
# 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
require('./domain1/wp-blog-header.php');
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} ^domain1/ [NC]
RewriteRule ^domain1/(.*)$ http://www.domain1.com/$1 [R=301,L]
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
codex(dot)wordpress(dot)org/Changing_The_Site_URL
http://example.com/blog/wordpress/
The .htaccess for your Wordpress install should not have the www HOST redirect, that belongs only in your main folder where your site's files are.