Perl and Wordpress

software development

#1

I am having problems executing Perl scripts from subdirectories in my Wordpress install. It is currently set up so that usr/home/main is my wordpress install, and I have scripts in usr/home/main/folder1 which I would like to run. What happens is that the server returns a 404 error when it sees some scripts, but not others. DreamHost support sent me over here with recommendations to modify the .htaccess to exclude certain folders. I have looked into this elsewhere on the internet and have modified it from being:

BEGIN WordPress

RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L]

END WordPress

and have changed it to:

BEGIN WordPress

RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} !^/(folder1|folder1/*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L]

END WordPress

There is no change between the two.

Is there something I am doing wrong, or should be doing differently?

Thanks


#2

Looking at an example similar to your situation at http://wiki.dreamhost.com/Making_stats_accessible_with_htaccess#What_To_Change make me suspect the your syntax is incorrect. Have you tried:

RewriteCond %{REQUEST_URI} !^/(folder1|folder1.pl).*$ [NC]

–rlparker
–DreamHost Tech Support


#3

I just tried modifying it to be:

RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} ^/(folder1|folder1\.pl).*$ [NC] RewriteRule . - [L]

BEGIN WordPress

RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L]

END WordPress

with no changes. I have also tried using folder1.* as the second argument with no difference.