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 6:23 PM, Jens-Uwe Mozdzen <jmozdzen@xxxxxx> wrote:

Hi Joydeep,

Zitat von Joydeep Bakshi <joydeep.bakshi@xxxxxxxxxxxxxx>:
On 24-May-2013, at 6:06 PM, "Jens-U. Mozdzen" <jmozdzen@xxxxxx> wrote:

Hi Joydeep,

Zitat von Joydeep Bakshi <joydeep.bakshi@xxxxxxxxxxxxxx>:
[...]
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

[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