views:

36

answers:

1

Hi,

I would like to rewrite:

http://url.com/app%5Fname/action.do

to

http://url.com/context/action.do?value=1

My question is how to add the variable 'value' to the url for each rewrited URL (it's a hard coded value) ?

#RewriteRule ^/app_name(.*) /context$1

Thanks!

A: 

Try this rule:

RewriteRule ^/app_name(/.*)?$ /context$1?value=1 [QSA]

The QSA flag is to automatically append the original query to the new one.

Gumbo
Thanks a lot for the QSA flag tip!
Wickramben