Mod_rewrite too many redirects

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

 



Hi,

I am trying to achieve below redirection rule:
http://localhost/?1234ab 
this url should be redirected to below url:
http://localhost/welcome?trackFor=0&trackNo=1234ab
(where welcome?trackFor=0trackNo= always remains same)

Here you can see at the end, the query string is passed same as in source url i.e. 1234ab

I wrote the below Rewrite rule and condition:
 
 <IfModule mod_rewrite.c>
 RewriteEngine On
 RewriteCond %{QUERY_STRING} (.*(([0-9]+).*)) [NC]
 RewriteRule ^(.*)$ /welcome?trackFor=0&trackNo=%1 [L,R=302,QSD]
 </IfModule>

When I hit the source URL in browser: http://localhost/?1234ab

I receive, too many redirects error in browser and page keeps on loading.

Am I missing something in mod_rewrite?

Cheers

-Vicky

[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