Forum Moderators: phranque
I am using mod_rewrite for URL re-writing. I am using apache 2.2 and in the httpd.conf i have the following rule
RewriteRule ^/foo/((.)+)$ /$1 [R=301,L]
Where /((.))+ is evaluated to mymachine.com/myapp?param1=val¶m2=value
Problem is that this evaluated URL is shown in the address bar, is there a way in the mod_rewrite that this URL is not shown in the address bar.
Thank in advance
Ramzan
you probably want to do in internal rewrite rather than an external redirect.
the R code specifies an external redirect.
try this instead:
RewriteRule ^/foo/((.)+)$ /$1 [L]
I tried it out with simple [L] but it still shows the full URL in the address bar with all the parameters in the query string.
Is there a way that when a re-write rule is evaluated the expanded URL is not shown in the address bar or is shown without query string?
Thanks for help
RewriteRule ^/foo/secureit/((.)+)$http://localhost:9999/secureapp/resolve?$1 [R=301,L]
RewriteRule ^/foo/((.)+)$ /$1 [R=301,L]
Basically,first my app is redirected to a locally deployed secureapp which returns a URL matching the pattern, ^/foo/((.)+).
When the second rule is evaluated, full URL is displayed in the address bar.