httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Darren Ward (darrward)" <darrw...@cisco.com>
Subject RE: [users@httpd] Rewrite all to DocRoot
Date Sat, 22 Feb 2014 08:33:21 GMT
Hi Guys

I'm still struggling with the AliasMatch

I need to redirect everything that doesn't match a couple of specific requests to the root
index.html of the virtual server but I can't find any examples on using conditional statements

For example I have:

    AliasMatch /perl/(.*)$ /var/www/perl/$1
    AliasMatch /success.html$ /www/docs/wifi-tc/library/test/success.html
    AliasMatch ^(.*)$ /www/docs/wifi-tc/index.html

So that the first rule would use a central perl directory but keep the script name from the
original request

Second rule is to redirect and Apple device attempting to perform captive portal detection
to a success page so the device will bring up a normal browser

The final one is to redirect everything  _esle_ to the index.html file specified

Problem is I think it will also hit matches to the first two rules as it flows through or
will it hot a match and stop processing?

Darren

-----Original Message-----

> On each of these virtual hosts I want a request for any URI to be sent to the document
root default (/index.html or just /)
>
> What the best way to do this per virtual host?

I usually use:

AliasMatch ^(.*)$ /fspath/to/index.html



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message