Re: apache redirection does not work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Oct 1, 2009 at 9:37 AM, Bob Ionescu <bobsiegen@xxxxxxxxxxxxxx> wrote:
> 2009/10/1 Sharjeel Tariq <sharjeel.tariq1@xxxxxxxxx>:
>> RewriteCond %{HTTP_HOST} ^example.com$
>> RewriteRule ^/(.*)$ http://www.example.com/$1 [L,R]
>>
>>
>> The above rule works for all urls except when I have urls like
>>
>> http://example.com/news/headlines/more.jsp?content=20090624_075115_6540
>>
>> Instead of redirecting the above url to
>>
>> http://www.example.com/news/headlines/more.jsp?content=20090624_075115_6540
>>
>> It is redirecting it to home page of site with
>> "?content=20090624_075115_6540" at the end
>>
>>
>> http://www.example.com/index.jsp?content=20090624_075115_6540
>
> Please enable a RewriteLog with
>
> Rewritelog logs/rewrite_log
> Rewriteloglevel 6
>
> in your httpd.conf and post the result (may be as an attachment).
>
> Bob
>
> ---------------------------------------------------------------------
> 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: users-unsubscribe@xxxxxxxxxxxxxxxx
>   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx
>
>

Try adding QSA to the flags at the end of the redirect.  (Query-String All)

---------------------------------------------------------------------
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: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux