以下是此特定文章文件夹的.htaccess文件。我的问题是这些网址在php脚本收到时都拆分了$ _GET变量。
这两个url都创建了这个$ _GET数组:
Array ( [article] => test- [-cake] => [folder] => none )
Options +FollowSymLinks
RewriteEngine On
RewriteBase /food-and-diet/
RewriteRule ^.+(/css/.+)$ $1 [L]
RewriteRule ^.+(/js/.+)$ $1 [L]
RewriteRule ^.+(/images/.+)$ $1 [L]
RewriteRule ^\index.html$ index.php [NC,L]
Rewriterule ^articles/?$ index.php?index=$1&article=none&folder=none [NC,L]
Rewriterule ^articles/([^.^/]+)/?$ index.php?article=none&folder=$1 [NC,L]
RewriteRule ^articles/([^/]+)\.jpg$ articles/$1.jpg [L]
RewriteRule ^articles/([^/]+)\.gif$ articles/$1.gif [L]
RewriteRule ^articles/([^/]+)\.png$ articles/$1.png [L]
Rewriterule ^articles/([^/]+)\.html$ index.php?article=$1&folder=none [NC,L]
RewriteRule ^articles/([^.^/]+)/([^/]+)\.jpg$ articles/$1/$2.jpg [L]
RewriteRule ^articles/([^.^/]+)/([^/]+)\.gif$ articles/$1/$2.gif [L]
RewriteRule ^articles/([^.^/]+)/([^/]+)\.png$ articles/$1/$2.png [L]
Rewriterule ^articles/([^.^/]+)/([^/]+)\.html$ index.php?article=$2&folder=$1 [NC,L]