the redirection rule is written in a separate file under <VirtualHost *>.
RewriteCond %{HTTP_HOST} ^example.com$
RewriteRule ^/(.*)$ http://www.example.com/$1 [L,R]
The issue was that above rule works for all urls except for urls like
http://example.com/news/headlines/more.jsp?content=20090624_075115_6540
the rule redirects the above url to home page of site
http://www.example.com/index.jsp?content=20090624_075115_6540
Thanks,
Sharjeel.
On Fri, Oct 2, 2009 at 3:59 PM, Eric Covener <[email protected]> wrote:
> On Fri, Oct 2, 2009 at 3:48 PM, Sharjeel Tariq
> <[email protected]> wrote:
> > rewriteEngine is on. Here is the rule in Virtual Host.
> >
> > <VirtualHost *>
> > Servername www.example.com
> > DocumentRoot /www/www_example_com/
> > CustomLog /var/log/apache/www_example_com_access.log
> > combined env=!disable_logging
> > ErrorLog /var/log/apache/www_example_com_error.log
> > include conf/shared/blockWebInf.inc
> > CookieDomain .example.com
> > WLCookieName visunique
> > CookieTracking on
> > RewriteEngine On
> > RewriteRule ^/(.*\.jsp.*$|.*\/$|$)
> > http://localhost:6201/www_example_com/$1 [P]
> > ProxyPassReverse / http://localhost:6201/www_example_com
> > </VirtualHost>
> >
> >
> > Can I say this is a bug in apache as I got this redirction rule from
> apache
> > manual to redirect all non 'www' requests to 'www' requests but it seems
> as
> > apache is not handling the urls with parameter at the end?
>
> Did you paste the right snippet? That's a pretty elaborate regex, and
> doesn't redirect at all but proxies.
>
> --
> Eric Covener
> [email protected]
>
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: [email protected]
> " from the digest: [email protected]
> For additional commands, e-mail: [email protected]
>
>