Question

I've been fiddling with the mod_rewrite for some time now, but is has gotten the best of me. Hope anyone here can shine some light on my problem.

I'm trying to self host wordpress and it works great when I set mod_rewrite to off in the .htaccess file for the site. But if I turn it to on it gives me a forbidden error. And log shows:

Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden: /c/blog/wp-admin/index.php, referer: http://xxx.xxx.xxx.xxx/blog/wp-admin/options-permalink.php

.htaccess contains

<IfModule mod_security.c>
    SecFilterEngine Off
    SecFilterScanPOST Off
</IfModule>

# 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

Thanks in advance!

Was it helpful?

Solution 3

Apparently there is a quirk with hosting wordpress on a readynas where the .htaccess files just make it b0rk. solution is to change from Options Indexes to Options All in /etc/frontview/apache/Shares.conf

OTHER TIPS

Check to make sure your Apache user (wwwuser or webserv?) can read .htaccess in the root folder.

To make this really easy you can just make the file world-readable and writable (chmod 777) but please be sure to return it back to a more sane 755 later on.

If you find this is your bug, check the user:group on .htaccess (ls -la .htaccess should do the trick) and make sure that it matches your other files.

It looks like something in your Apache config is forbidding the "RewriteRule" line? The log output suggests you might need to turn on FollowSymLinks or SymLinksIfOwnerMatch

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top