Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Regular expression

Status
Not open for further replies.

AlStl

MIS
Oct 2, 2006
83
0
0
US
I have a directory and following are its contents:

/ppp/ndm/ndm_ari

drwxr-xr-x WEB-INF
-rw-r--r-- about.jsp
-rw-r--r-- index.jsp
-rw-r--r-- help_docs.jsp

Can someone please explain to what this expression will result in:

^/(.*)$ /ppp/ndm/ndm_ari/$1

I am assuming results of regular expression ^/(.*)$ will appended to /ppp/ndm/ndm_ari by using $1. But I just can't figure out what this regular expression will produce? Is there any way to write a shell script to see this in real time?

I tried ..but no success:

#!/bin/ksh
var = `grep '^/(.*)$' /ppp/ndm/ndm_ari/$1`
echo $var

No errors, but no results either.

Thx.
 
Where is this RE coming from ? Which context ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
It is passed to a RewriteRule directive in apache httpd.conf file as show below:

<Virtual Host *:80>
ServerName fakename.xx.com
RewriteEnginer on
RewriteRule ^/(.*)$ /ppp/ndm/ndm_ari/$1 [L,PT]
JKMount /* tomcatinstancename
</Virtual Host>
 
My guess is that /WEB-INF will be rewritten as /ppp/ndm/ndm_ari/WEB-INF

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Is there a way to test this via shell script?
 
I wish I found this before posing, but I hope this will help others.

Link
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top