Sample Header Ad - 728x90

Apache redirection based on referrer in CentOS 7

0 votes
1 answer
115 views
**How can I configure Apache httpd on a CentOS 7 server so that requests for any path under home.mydomain.com are only served if the referrer for the request was from a path under mydomain.com?** And so that requests from referrers other than mydomain.com are redirected to mydomain.com/login? Here are the VirtualHost definitions for mydomain.com and for host.mydomain.com: ServerName www.mydomain.com ServerAlias mydomain.com ErrorLog /var/log/httpd/mydomain_com_error.log CustomLog /var/log/httpd/mydomain_com_requests.log combined DocumentRoot /var/www/mydomain.com/public_html ServerName home.mydomain.com ProxyPass / http://localhost:4000/ connectiontimeout=5 timeout=30
Asked by CodeMed (5357 rep)
Jun 30, 2017, 11:16 PM
Last activity: Jul 1, 2017, 02:25 AM