htaccess WordPress and separate directory without filenames

On a site I’m working on the main portion of the site is wordpress powered.

I’ve added another directory completely separate from the wordpress site called employees and I’m having a little issue with the mod_rewrites for the new directory.

Read More

obviously wordpress uses this code to make its pretty urls

# BEGIN WordPress

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php

</IfModule>

# END WordPress

but I want to add this rule as well and any other necessary rules or conditions so that all of the /name.php files in the employees directory get redirected to just /name

RewriteRule ^employees/(.*)$ employees/$1.php [L,QSA]

The several things I’ve tried all just cause employees/main to 404 but employees/main.php resolves properly.

Related posts

Leave a Reply