하위 페이지 집합에서 다른 URL로 리디렉션을 설정하고 싶지만 작동하지 않습니다. 동일한 시스템/네트워크(다른 것)에 있지 않기 때문입니까? 원본 서버에 인증서를 추가해야 합니까?
나는 시도했다 :
Redirect /subpage https://another-url-i-own.net/page1/page2
또는
Redirect /subpage/.* https://another-url-i-own.net/page1/page2
또는
Redirect /subpage/* https://another-url-i-own.net/page1/page2
또는 Redirect Permanent 또는 Redirect 301 등을 사용하여
KO
나에게 가르쳐 주시겠습니까?
=> 아파치 conf 파일 :
DirectoryIndex index.php index.html
<VirtualHost *:80>
ServerName mydomain.org
DocumentRoot "/var/www"
Redirect /servicedesk/.* newdomain.org
<Directory "/var/www">
AllowOverride All
Options -Indexes +FollowSymLinks
Require all granted
</Directory>
RewriteEngine On
RewriteCond %{HTTP_HOST} !^mydomain.org$
RewriteRule ^.*$ https :// mydomain.org%{REQUEST_URI} [L]
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} !=/server-status
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</VirtualHost>
<VirtualHost *:443>
ServerName mydomain.org
DocumentRoot "/var/www"
Redirect /servicedesk/.* newdomain.org
SSLEngine on
#SSLCipherSuite AES256+EECDH:AES256+EDH
SSLProtocol All -SSLv2 -SSLv3
SSLHonorCipherOrder On
SSLCompression off
SSLCertificateFile /etc/ssl/certs/mydomain.org.cer
SSLCertificateKeyFile /etc/ssl/certs/mydomain.org.key
SSLCertificateChainFile /etc/ssl/certs/cacerts-mydomain.org.cer
<Directory "/var/www">
AllowOverride All
Options -Indexes +FollowSymLinks
Require all granted
</Directory>
ErrorDocument 503 /html/maintenance_hosting.html
SSLProxyEngine On
ProxyRequests Off
ProxyPreserveHost On
TimeOut 600
KeepAliveTimeout 600
<Proxy *>
Require all granted
</Proxy>
ProxyRequests Off
ProxyPreserveHost On
ProxyPass /html !
ProxyPass /server-status !
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from localhost
</Location>
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
ErrorLog /randomfolder/apache2/log/error.log
CustomLog /randomfolder/apache2/log/access.log combined
Header always set Strict-Transport-Security "max-age=63072000; includeSubdomains;"
</VirtualHost>
답변1
. RedirectMatch
대신 사용해야 한다는 점을 제외하면 두 번째 예는 정확합니다.Redirect
RedirectMatch /subpage/.* https://another-url-i-own.net/page1/page2