Мне нужно взять URL
/Fileshare%20Server/public/9d487a5a2681d0b89540ad1a0cadcd2e.php
и заменить на
/Fileshare%20Server/data/public/9d487a5a2681d0b89540ad1a0cadcd2e.php
, но% 20, кажется, вызывает у меня проблемы, когда я пытаюсь перенаправить с помощью файла .htaccess
я пробовал
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule ^(.*)$ /Fileshare%20Server/data/$1
Мой ожидаемый файл .htaccess
<IfModule mod_rewrite.c>
# You must set the correct values here if you want
# to enable webDAV sharing. The values assume that your
# ajaXplorer installation is at http://yourdomain/ajaxplorer
# and that you want the webDAV shares to be accessible via
# http://yourdomain/ajaxplorer/shares/repository_id/
RewriteEngine on
RewriteBase /ajaxplorer
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^shares ./dav.php [L]
RewriteRule ^api ./rest.php [L]
#Following lines seem to be necessary if PHP is working
#with apache as CGI or FCGI. Just remove the #
#See http://doc.tiki.org/WebDAV#Note_about_Apache_with_PHP_as_fcgi_or_cgi
#RewriteCond %{HTTP:Authorization} ^(.*)
#RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]
</IfModule>
RewriteEngine On RewriteCond% {REQUEST_URI}! ^ / Public / RewriteRule ^ (. *) $ / Fileshare% 20Server / data / $ 1
Когда я открываю ссылку
domain.com/Fileshare%20Server/public/9d487a5a2681d0b89540ad1a0cadcd2e.php
Я ожидал, что она перейдет на
Fileshare%20Server/data/public/9d487a5a2681d0b89540ad1a0cadcd2e.php
, но все, что я получаю, этобитая ссылка