I have the following in my .htaccess
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ /rewrite/index.php?pages=$1 [L]
Which works great to rewrite all the files and directories that do not exist. But now I need to do another more specific rewrite
The condition should be "If the requested URI does not exist AND it ends with attendees/" then Apply RewriteRule ^(.+)$ /rewrite/attendees.php?pages=$1 [L]
How could this be applied?
At first I thought it would be read in order of listing and thus tried:
RewriteCond %{REQUEST_FILENAME} employee [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ /rewrite/attendees.php?pages=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ /rewrite/index.php?pages=$1 [L]
But failed...
SOLVED USING THIS:
RewriteCond %{REQUEST_URI} (employee) [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ /rewrite/employee.php?pages=$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ /rewrite/index.php?pages=$1 [L]