0

I install fresh installation of wordpress in my server sub-folder call blog.

So in the beginning I access the site mydomain/blog and it works perfectly.

But when I changed the permalinks settings to Post name option in the settings, all urls giving me 403 - forbidden error including frot-end.

And then I realize it is because of .htaccess file inside the /blog folder as bellow.

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

# END WordPress

It was automatically create after I change the permalinks settings. When I rename the .htaccess file to another name homepage is accessible and not others.

Does anybody have an idea to what should I do in order to get the things back in action.

Thanks in advance.

0

Are you sure the rewrite module is enabled?

Type:

a2enmod rewrite

If you are on Linux or equivalent for your platform/setup. You can also try:

ls /etc/apache2/mods-enabled/

and look for the rewrite module in there?

| improve this answer | |
0

Try adding Options +FollowSymLinks to the top of the .htaccess file.

If that doesn't work, verify that the host has AllowOverride enabled. Verify what they have the AllowOverride set to.

mod_rewrite can be used to simulate a symbolic link. This is why mod_rewrite requires FollowSymLinks to be enabled, because it's a similar security thing. So if your host doesn't enable FollowSymLinks, and you try using mod_rewrite, you'll get the 403 error. Adding Options +FollowSymLinks will override it for your directory, allowing mod_rewrite to work.

But, if you have this problem and you add Options +FollowSymLinks and then get a 500 error instead, then your host is disallowing the use of the Options directive in .htaccess files, and there's little you can do but complain to them.

copied from : https://wordpress.org/support/topic/403-forbidden-after-enabling-permalinks

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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