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 13:03:29 GMT

On 24-May-2013, at 6:23 PM, Jens-Uwe Mozdzen <jmozdzen@nde.ag> wrote:

> Hi Joydeep,
> 
> Zitat von Joydeep Bakshi <joydeep.bakshi@netzrezepte.de>:
>> On 24-May-2013, at 6:06 PM, "Jens-U. Mozdzen" <jmozdzen@nde.ag> wrote:
>> 
>>> Hi Joydeep,
>>> 
>>> Zitat von Joydeep Bakshi <joydeep.bakshi@netzrezepte.de>:
>>>> [...]
>>>> Thanks but without the leading slash it still fails to provide the redirection.
>>>> Now I have
>>>> 
>>>> RewriteRule ^ALP33211$  /ALP33211&L=1 [R=301]
>>> 
>>> what's in mod_rewrite's debug log?
>>> 
>>> Regards,
>>> Jens
>>> 
>>> 
>> 
>> Hello Jens,
>> 
>> I get repeated
> 
> sorry, I missed the other response.
> 
>> 
>> `````````````
>> applying pattern '^ALP33211$' to uri
>> 
>> ``````````````
> 
> That's not very helpful yet - increase the log level so you see that a new request is
being handled and which rules apply and which don't - "RewriteLogLevel 5" might be a good
start.

It was level 5 and now I have set level 9.
From log it seems that the pattern is blindly applied to every link rather than matching the
query_string

applying pattern '^ALP33211$' to uri 'index.php'
applying pattern '^ALP33211$' to uri 'uploads/repository/02/1276_cn74_1001.gif'
applying pattern '^ALP33211$' to uri 'fileadmin/templates/images/btnAddCart.png'
……..
….

where te ruleset I have at .htaccess is

RewriteCond %{QUERY_STRING} ^Id=7572&doi=10.5414/ALP33211$
RewriteRule ^/ALP33211$  /ALP33211&L=1 [R=301]

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

Thanks
Mime
View raw message