boo_lolly Posted March 4, 2010 Share Posted March 4, 2010 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 https://forums.phpfreaks.com/topic/194070-wordpress-htaccess-and-subdirectories-should-be-a-simple-fix/ Share on other sites More sharing options...
boo_lolly Posted March 4, 2010 Author Share Posted March 4, 2010 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 https://forums.phpfreaks.com/topic/194070-wordpress-htaccess-and-subdirectories-should-be-a-simple-fix/#findComment-1021172 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.