I'm trying to create a Redirect using Apache HTTP Server's mod_alias and core on my system:
# cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.1 (Maipo) # rpm -q httpd httpd-2.4.6-31.el7_1.1.x86_64 # requirement is to redirect all requests, except for request to /server-status
# cat /etc/httpd/conf.d/_default.conf <VirtualHost *:80> ServerName _default_ <LocationMatch "^/!(server-status)(.*)?"> Redirect / http://X/ </LocationMatch> </VirtualHost> # I believe my issue is somewhere with regex, as I'm getting 404 no matter what URL I hit.
VirtualHost, henceServerNameset to_default_and noDocumentRooteither. btw I'm about to try your answer)