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?