httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joydeep Bakshi <joydeep.bak...@netzrezepte.de>
Subject Re: [users@httpd] .htaccess {QUERY_STRING} and issue with append a value
Date Fri, 24 May 2013 12:06:49 GMT

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

> On Fri, May 24, 2013 at 7:41 AM, Joydeep Bakshi
> <joydeep.bakshi@netzrezepte.de> 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@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message