So I have a .htaccess at the root directory of example.com:
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !\.(png|gif|ico|swf|jpe?g|js|css)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php?sef_rewrite=1 [L,QSA]
Now I’m installing wordpress at example.com/blog/, but after uploading wordpress files there, it’s 404 error when I visit http://www.example.com/blog/
My take is I should modify the .htaccess in the root directory of example.com or the request is redirected to /index.php rather than /blog/index.php
So I added this line to the .htaccess in the root directory:
RewriteCond %{REQUEST_URI} !^/blog
And the whole thing looked like:
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !\.(png|gif|ico|swf|jpe?g|js|css)$
RewriteCond %{REQUEST_URI} !^/blog
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.php?sef_rewrite=1 [L,QSA]
But it doesn’t work neither. It’s still 404 error when you visit http://www.example.com/blog/ so I couldn’t even install wordpress there.
How should I modify the .htaccess in the root directory to make this work? Thanks a lot!
Seems it’s not a .htaccess rewrite issue but a permission issue because I have suPHP installed which demands all files to be 644 and all directories to be 755 and all scripts are owned by the user.
So this question is meanless…