Re: .htaccess {QUERY_STRING} and issue with append a value

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

 



On 24-May-2013, at 5:22 PM, Eric Covener <covener@xxxxxxxxx> wrote:

> On Fri, May 24, 2013 at 7:41 AM, Joydeep Bakshi
> <joydeep.bakshi@xxxxxxxxxxxxxx> wrote:
>> Hello list,
>> 
>> Greetings !!
>> 
>> I am using {QUERY_STRING} to append a value to a particular URL.
>> 
>> The actual url is   http://www.mydomain.com/index.php?id=7&artId=7572&doi=10.5414/ALP33211
>> 
>> and it has to become
>> 
>> http://www.mydomain.com/index.php?id=7&artId=7572&doi=10.5414/ALP33211&L=5
>> 
>> The &L=5 has to be appended
>> 
>> Hence I have made the .htaccess rule as
>> 
>> RewriteCond %{QUERY_STRING} ^Id=7572&doi=10.5414/ALP33211$
>> RewriteRule ^/ALP33211$  /ALP33211&L=1 [R=301]
> 
> In .htaccess, a leading slash never matches in a RewriteRule.   The
> path you compare to is relative to where the htaccess is, without a
> leading slash.
> 

Thanks but without the leading slash it still fails to provide the redirection.
Now I have

RewriteRule ^ALP33211$  /ALP33211&L=1 [R=301]


---------------------------------------------------------------------
To unsubscribe, e-mail: users-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