我想编写一个规则,将某个特定模式的所有URL重定向到PHP文件。例外情况:CMS所在的control/
目录。重写规则不起作用
为什么
RewriteCond %{REQUEST_URI} ^/([^control]+)/([^/]+)$
RewriteRule .* /pages/index.php?language=%1&page=%2&%{QUERY_STRING} [L]
为
domain.com/deutsch/start
(它抛出404)无法正常工作,而
RewriteCond %{REQUEST_URI} ^/([^control]+)/([^/]+)/debug$
RewriteRule .* /pages/index.php?language=%1&page=%2&page_debug=yes&%{QUERY_STRING} [L]
作品
domain.com/deutsch/start/debug
?
%{REQUEST_URI}!^/control /? – Aif 2009-11-24 21:19:33
解决使用第二个条件,如你所述。 (我在mod_rewrite并不是那么棒)。谢谢! – 2009-11-24 21:35:33