0

this Rewrite rule is forwarding to url: https://www.fliesen-alfers.de/fliesennivelliersysteme/verlegefix-keilsystem/basis-sets/1-5-mm-basis-set/?number=102 as expected:

RewriteCond %{QUERY_STRING} (^|&)number=102(&|$) [NC]
RewriteRule ^fliesennivelliersystem/planfix-verlegefix/basissets/1-5-mm-basis-set/2283/planfix-fliesen-nivelliersystem-raimondi-rls-basisset-verlegefix-verlegehilfe-zubehoer-laschen-keile$ fliesennivelliersystem/planfix-verlegefix/basissets/1-5-mm-basis-set/? [R=301,L]

This Rewrite Rule is not forwarding at all, although, it's syntactically the same well formed:

RewriteCond %{QUERY_STRING} (^|&)number=80202010(&|$) [NC]
RewriteRule ^fliesenlegerwerkzeuge/sonderangebote/2272/zahnkelle-variotop-edelstahl-6-8-oder-10-mm-zahnung-verstellbar$ fliesenlegerwerkzeuge/sonderangebote/? [R=301,L]

Can anybody help me,please?!

4
  • Are you sure that the query string you're testing in the 2nd one actually does contain number=80202010? Also you can temporarily turn on logs that would log rewrite rules to see what's going on. Although it might be a lot to look through. cwiki.apache.org/confluence/display/HTTPD/RewriteLog
    – thegaffney
    Commented Jul 2 at 15:34
  • It's not important, what query string contains. It should redirect, what ever is defined, shouldn't it? Commented Jul 3 at 7:42
  • The RewriteCond rule is checking to see if something matches, and if so, THEN it does the RewriteRule. So if the RewriteCond is not true it wont even reach the Rule. And that 2nd Cond is looking for "number=80202010" in the query string. The 1st one is looking for "number=102" in the query string. Could you perhaps let us know what you want the 2nd one to do? Like what's an example input, and what should be the result?
    – thegaffney
    Commented Jul 3 at 14:51
  • Input is like this: fliesen-alfers.de/fliesennivelliersystem/planfix-verlegefix/… which should and will be redirected to fliesen-alfers.de/fliesennivelliersysteme/verlegefix-keilsystem/…. But second ReWriteRule will not work. Hoper, this helps! Commented Jul 5 at 6:20

0

You must log in to answer this question.

Browse other questions tagged .