具有动态路径的Apache重写规则问题

具有动态路径的Apache重写规则问题,apache,url-rewriting,Apache,Url Rewriting,我想使用以下方案创建重写规则: 排除/static文件的重写/ 排除重写/上载/ 将与/dynamic/tables/*匹配的URL重定向到/ajax/getdata/index.php RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-l RewriteCond %{REQUEST_URI} !^/s

我想使用以下方案创建重写规则:

排除/static文件的重写/ 排除重写/上载/

将与/dynamic/tables/*匹配的URL重定向到/ajax/getdata/index.php
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_URI} !^/staticfiles/.*$
RewriteCond %{REQUEST_URI} !^/uploads/.*$
RewriteRule ^/dynamic/tables/(.*)$ /ajax/getdata/index.php?l=$1 [R=301,NC,L]
RewriteRule ^(.+) index.php?l=$l [QSA,L]