I'm currently setting up a WordPress multisite installation for my company and I've run into an issue.

The set up is that the multisite runs out of a subdirectory (/wp) but appears to be at the root of the site. It's using subdirectories for each site in the network (ex. domain.com/news).

I've followed the wordpress.org guides and have gotten the install running just fine. The problem is that I've found out that the mod_rewrites I needed to add for WordPress to work cause any .pl scripts in the /cgi-bin folder to stop working (Error 403). I know they're super old; I'd like to switch them to much better forms scripts but that's a battle for another time. The cgi-bin scripts are very important for the business so I can't go forward with any more WordPress development until I find a solution.

What solutions I have found are for non-multisite Wordpress and don't seem to work for my setup. I'm not very familiar with .htaccess and mod_rewrite so I'm not sure what I should be doing.

Here's the code I need to add to the .htaccess located at the root of the site:

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) wp/$2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ wp/$2 [L]
RewriteRule . index.php [L]

I think I'm suppose to add a rule like this one to get it to ignore /cgi-bin:

RewriteCond %{REQUEST_URI} !^/cgi-bin/

But either that's the wrong rule or I'm putting it in the wrong place. Can anyone help me figure this out?

1 Answer 1


It turns out that the problem wasn't WP per say but that mod_rewrite was being forbidden because of some server settings. I didn't realize it until the server guy sent over an error log that was filled with messages containing:

Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden

To make it work, he had to activate FollowSymLinks and SymLinksIfOwnerMatch in one of the server config files (I'm not sure which):

<Directory [REMOVED]>
       Options +ExecCGI +FollowSymLinks +SymLinksIfOwnerMatch
       AllowOverride None
       #Options None
       Order allow,deny
       Allow from all

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.