我为我的页面塑造了两个不同的RewriteRules:
# Enable URL Rewriting
RewriteEngine on
# exclude followed stuff
RewriteRule ^(js|img|css|favicon\.ico|image\.php|anprobe|content|libs|flash\.php|securimage)/ - [L,QSA,S=2]
# conditions (REQUEST dont point @ file|dir|link)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-F
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
# rules
RewriteRule ^(?!index\.php)brillen/(.*(brillen)|360|neu)/(.*)([a-zA-Z0-9]{5}-[a-zA-Z0-9]{5}(?!\.))(.*)$ /index.php/brillen/$1?art_id=$4&$5&%{QUERY_STRING} [NS,QSA,L]
RewriteRule ^(?!index\.php)(.*)$ /index.php/$1 [NS,QSA,L]
Run Code Online (Sandbox Code Playgroud)
...而且我遇到了一个奇怪的问题,它存在于导致页面内部加载两次的每个请求中,这导致db操作和电子邮件调度也执行两次的问题.
有没有人对此有所了解?
提前致谢!
注1:根据浏览器的资源跟踪,所有请求的资源都是有效的.
注2:问题可能源于保留和后处理PATH_INFO?(/index.php/$1 => /index.php/foo/bar/...)