Ниже представлен мой файл .htaccess для этой конкретной статьи. Моя проблема в том, что эти URL-адреса разделяют переменную $ _GET, когда она получена скриптом php.
- /продуктов питания и диеты/Статьи/тест- & -cake.html
- /food-and-diet/articles/test-%26-cake.html
Оба эти адреса создать этот $ _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]
Вам нужно было использовать & в имени файла? – dekomote
Я должен разрешить возможность, клиент спросил как таковой. – Darpeh