httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Evans <>
Subject Re: [users@httpd] .htaccess {QUERY_STRING} and issue with append a value
Date Fri, 24 May 2013 13:16:12 GMT
On Fri, May 24, 2013 at 2:03 PM, Joydeep Bakshi
<> wrote:
> 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'

That cannot be correct, At log level 9, the rewrite log would contain
a mass of information for a single request, where as you are showing
only one line per request.

Please do not trim the log contents or decide what is important and
what is not, show the entire rewrite log for a single request that
should be rewritten.

> ……..
> ….
> 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
> and it has to become

The URL is "/index.php". Everything else is part of the query string.
Your RewriteRule is predicated on the URL "/ALP33211", and so is
ignored. In a .htaccess, you must also not specify the leading '/'

Please do show the correct log entries, but this should work (untested):

RewriteCond %{QUERY_STRING} ^Id=7572&doi=10.5414/ALP33211$
RewriteRule index.php index.php?L=5 [QSA,R=301]



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message