Переименовать параметр через mod_rewriteApache

Anonymous
Переименовать параметр через mod_rewrite

Сообщение Anonymous »

Я хочу переименовать конкретный параметр http, поскольку приложение (NextCloud) Изменил его с Path To Dir, и я хочу сохранить совместимость со старыми ссылками. https://example.com/index.php/s/public? ... /to/folder написано

Код: Выделить всё

RewriteCond %{QUERY_STRING} (^|&)path=([^&]+)(&|$)
RewriteRule ^/index\.php/s/public$ /index.php/s/public?dir=%2 [L,R=301]

Which relativelly worked but has problems with escaped slashes in the parameter path.
For example, if link was: https://example.com/index.php/s/public? ... o%2FFolder
it was rewrited to: https://example.com/index.php/s/public? ... %252folder (chracter%был сбежал).
Помогите, как прекратить сбежать уже сбежавших персонажей.>

Подробнее здесь: https://stackoverflow.com/questions/797 ... od-rewrite

Вернуться в «Apache»