Welcome! Log In Create A New Profile

Advanced

аналог htaccess правила

October 29, 2014 11:07AM
Подскажите, как можно с эмитировать вот такое htaccess правило:

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([A-z0-9-_]+\/)(.*)$ /$1index.php?req=$2&module=$1 [QSA,L]

тобишь если есть шлем все запросы в папку, остальное передаем в переменной $req
Например запрос: /catalog/section_1/section_2/section_3/?aa=11&bb=22

В папке /catalog/ получаем:

Array
(
[req] => section_1/section_2/section_3/
[module] => catalog
[aa] => 11
[bb] => 22
)
Subject Author Posted

аналог htaccess правила

sunyang October 29, 2014 11:07AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 70
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready