I have a non-Wordpress site , www.example.com
For canonicalization purposes I have this in .htaccess :
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.example\.com$
RewriteRule (.*) http://www.example.com/$1 [R=301,L]
This way all non-www links will be redirected to www version of site.
Recently I decided to attach a wordpress blog at www.example.com/blog . After the installation is complete, whenever I go to www.example.com/blog I get 404 - Page not found error. I tried both auto install with Fantastico and a manual install, with the same result.
I found out that when I remove the piece of code above from my .htaccess it fixes the problem, and wordpress installation is accessable and usable.
However, I would like to keep the the original htaccess settings, for SEO purposes. I tried to change url version in wordpress General Settings and then restore main site htaccess file - it would still break the wordpress and 404 is back again.
I tried to add next code in wp-config.php :
define('WP_HOME','http://www.example.com/blog');
define('WP_SITEURL','http://www.example.com/blog');
It didn't fixed the problem either...
I understand it has something to do with htaccess. I also notices that there is no htaccess file in wordpress folder, probably due to the fact that I haven't changed permalinks settings yet.
I would appreciate any help on this matter!
P.S: I just noticed that www.example.com/blog/wp-login.php is visible regardless of htaccess config, however after I log in it brings me to 404 page again :(
http://www.example.com/blog
if it's installed in a folder namedblog
..htaccess
in theblog
directory -- I'm thinking that that new .htaccess will override the one in the parent directory.