Want to use a url that is outside of wordpress folder

Guys I need help.

I installed wordpress in a subdirectory (everything is working) but created another directory (subdirectory) that is outside of wordpress directory. I get a 404 error when I try access the directory url. for example;

My wordpress installation is in Wordpress directory (sub directory) www.example.com/wordpress, I moved the .htacess to the root directory in order for to access wordpress using www.example.com. Everything works fine except that I created a facebook app that I placed in a different directory called Facebook, and gets a 404 error when I try to access the facebook app using www.example.com/facebook. Any ideas on how to resolve this?

In order to answer your question, could you please post the (complete) .htaccess you’re using right now?

Thanks ScallioXTX, below is the .htaccess that I have.

<Files ~ "^.*\\.([Hh][Tt][Aa])">
 order allow,deny
 deny from all
 satisfy all
</Files>


IndexIgnore *

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\\.)?example.com/.*$ [NC]
RewriteRule \\.(gif|jpg|js|css)$ - [F]

# 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

This should be part of the main server configuration. It doesn’t hurt to have it here, but if it’s also in the main server config (which you can test by removing it from your htaccess and see if you can access [noparse]www.yourwebsite.com/.htaccess[/noparse]) I’d remove it to avoid the server having to do the same thing twice for each and every request – which is just a waste of resources.

You don’t need this. Once you’ve established mod_rewrite works there is no need to keep asking apache over, and over, and over again – again, a waste of resources (WordPress’s fault – not yours).

You already had that, no need to start it twice :slight_smile:

You don’t have any aliases (mod_alias), so unless your host is set up very weirdly you don’t need this – remove it, and when everything breaks down, put it back.

Remove this is as well, as it closes something we removed before.

So:


IndexIgnore *

RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\\.)?example.com/.*$ [NC]
RewriteRule \\.(gif|jpg|js|css)$ - [F]

# BEGIN WordPress
RewriteRule ^index\\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

There, that’s better :slight_smile:

As for your question, I don’t see anything in there that would screw that up. Are you sure you use the correct case when requesting the URL? (In your OP you mentioned you have a directory Facebook and that [noparse]www.yourdomain.com/[/noparse]facebook doesn’t work – as *nix is case sensitive, these are not the same)

Thanks ScallioXTX. You solved my issue. It was a case sensitive issue just like you noted at the end of the post. I also cleaned up the codes. Thanks again. I appreciate your help.