I've installed my wordpress site on a separate directory and followed all the steps described here and now I can access my site from my main domain. So, my Wordpress site is installed under: www.mysite.com/wp-site/ and now I can access my site under www.mysite.com, so all is great, exactly what I wanted. Wordpress is开发者_JAVA百科 making this happen through an .htaccess file it creates that has the necessary code to make the redirection happen (SEE CODE BELOW).
My problem is that I have other directories on my site, such as www.mysite.com/another-directory-unrelated-to-wordpress/ that I cannot access anymore because I believe wordpress and the .htaccess file it created is redirecting everything to the root.
How can I avoid Wordpress from redirecting all my other subfolders and files? Thanks a ton for any ideas or help.
Here is the htaccess file code:
# 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
The way the WordPress .htaccess file works is if an existing file or directory is requested, it does not send the request through WordPress...that's what the !-f
and !-d
RewriteCond
statements do.
So, there is something else going on with your site. Have you used Firebug or any other debugging tool to see what is happening with the request/response?
You could always enable mod_rewrite logging to see if that gives you a clue.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteLog "rewrite.log"
RewriteLogLevel 3
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
A RewriteLogLevel
of 5 would give you the most information. Make sure to comment out or remove the RewriteLog* lines when you have figured out the issue.
UPDATE: Check this other SO answer to see if it resolves your issue
精彩评论