Quero definir um redirecionamento de apenas um conjunto de subpáginas para outro URL, mas isso não funciona. É porque não está na mesma máquina/rede (outra coisa)? Devo adicionar seus certificados no servidor de origem?
Tentei :
Redirect /subpage https://another-url-i-own.net/page1/page2
ou
Redirect /subpage/.* https://another-url-i-own.net/page1/page2
ou
Redirect /subpage/* https://another-url-i-own.net/page1/page2
ou com Redirecionamento Permanente ou Redirecionamento 301 etc.
Nocaute
Você poderia me esclarecer?
=> arquivo conf do apache:
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>
Responder1
Seu segundo exemplo está correto, exceto que você precisa usar RedirectMatch
em vez de Redirect
.
RedirectMatch /subpage/.* https://another-url-i-own.net/page1/page2