I'm new to Apache and I'm having trouble understanding Rewrite rules.
On my test server I have an arbitrary Apache config which serves up an Elasticsearch instance to select IPs.
What I have so far is:
<VirtualHost *:80>
ServerName home.mytest.server
ProxyPass /esearch http://127.0.0.1:9200
ProxyPassReverse /esearch http://127.0.0.1.9200
<Location /esearch>
order deny,allow
deny from all
allow from <my IP>
</Location>
<Location /esearch/*/_search>
#Alter URI in here
order deny,allow
deny from all
allow from <my IP>
</Location>
</VirtualHost>
What I want to do is rewrite all requests to /esearch/*/_search
to include a default value in the path. So /esearch/*/_search
is rewritten to /esearch/myIndex/*/_search
.
How do I do this? I've read up about the RewriteConditions and Rules but it's not really sinking in.