0

On localhost (WAMP server) I have installed wordpress in the root directory (examplesite.com). I have an application that needs to run outside of Wordpress, so I would like it in the folder /application (examplesite.com/application). I created the folder “application” in the root, but when I go to the url examplesite.com/application, I get the message “Forbidden you don't have permission to access examplesite/application/< on this server”.

I found a solution suggesting to add the following to my htaccess, but it didn’t work for me.

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_URI} ^/application/(.*)$ [OR]
    RewriteRule ^.*$ - [L]
    </IfModule>
    # 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`

Any advice? Thank you in advance!

2 Answers 2

2

You can revert to the default WordPress rewrite rules. This line already handles checking for existing physical directories:

RewriteCond %{REQUEST_FILENAME} !-d

Your problem does not lie with WordPress, but with some other problem with your server/htaccess files. You have not provided enough information to solve your problem, but it probably is an issue with file permissions, Deny from rules in htaccess, or indexes.

0

Try it like that:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_URI} !^/application/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

and additional .htaccess in application folder

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.