Jump to content

Wordpress, .htaccess, and subdirectories (should be a simple fix)


boo_lolly

Recommended Posts

Hey all,

 

I have a Wordpress installation (inside the root directory) that uses a .htaccess file to have clean urls for posts and pages. It looks like this:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

 

However, I want to add a subdirectory inside this wordpress installation so I can add other stuff or another app or whatever I want and still access it. So to verify, wordpress is here: http://www.mydomain.com/, and my subdirectory is here: http://www.mydomain.com/subdir/. However, when I go to my subdirectory in my web-browser I get a 403 error:

Forbidden

You don't have permission to access /subdir/ on this server.

 

I know that the permissions to this directory are just fine (777 just to be sure) and I still get the same error. How can I write a rule or condition in my .htaccess file that will allow normal use of this directory??

Link to comment
Share on other sites

Alright so the problem was not Wordpress, it wasn't .htaccess, it wasn't the subdirectory permissions, it was a centos server thing. If there's nothing inside the directory, it'll automatically bring up a 403 error. As soon as I put a blank index.php file in there, everything was fine.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.