Question

I would like to set up an Apache redirect rule which will accept the following browser URL:

192.168.100.128/test 

and transform it into the following:

http://192.168.100.128:9001/forms/frmservlet?config=testjpi

I have had a look at the httpd.conf and have tried to use both the Alais and Rewrite modules but I can't get either to work.

Alias:

Alias /test http://192.168.100.128:9001/forms/frmservlet?config=testjpi

And also Rewrite:

<IfModule rewrite_module>
 RewriteEngine  on
 RewriteRule    http://192.168.100.128/test  http://192.168.100.128:9001/forms/frmservlet?config=testjpi
 RewriteRule    /test   http://192.168.100.128:9001/forms/frmservlet?config=testjpi 
</IfModule>

Any ideas if what I'm doing is even possible, and if so, how do I go about getting it right? I have limited knowledge of Apache so I'm going in a bit blind.

TIA.

Était-ce utile?

La solution

Alias won't work on URLs it only works to directories.

Try:

Redirect permanent /test http://192.168.100.128:9001/forms/frmservlet?config=testjpi

for more documentation: http://httpd.apache.org/docs/2.2/mod/mod_alias.html#redirect

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top