Rewrite Mod issue

Posted by Caro Fiedler on Stack Overflow See other posts from Stack Overflow or by Caro Fiedler
Published on 2013-10-21T15:20:18Z Indexed on 2013/10/21 15:54 UTC
Read the original article Hit count: 215

Filed under:
|
|

I have the follow code:

if (isset($_GET['preis']) && $_GET['preis']==="0-100-euro"){
    $preis = "WHERE preis >= 0 and preis <= 100";
}
elseif (isset($_GET['preis']) && $_GET['preis']==="100-200-euro"){
    $preis = "WHERE preis >= 100 and preis <= 200";
}
elseif (isset($_GET['preis']) && $_GET['preis']==="200-300-euro"){
    $preis = "WHERE preis >= 200 and preis <= 300";
}
elseif (isset($_GET['preis']) && $_GET['preis']==="300-500-euro"){
    $preis = "WHERE preis >= 300 and preis <= 500";
}
else {

}


$abfrage = "SELECT * FROM outfits $preis LIMIT $start, $eintraege_pro_seite";
$ergebnis = mysql_query($abfrage);

example.com/?preis=100-200-euro works but example.com/preis-100-200-euro/ is not

This is my htaccess:

RewriteEngine On

RewriteRule ^preis-([^-]*)/seite-([^-]*)/$ ?preis=$1&seite=$2 [L]

RewriteRule ^preis-([^-]*)/$ ?preis=$1 [L]
RewriteRule ^seite-([^-]*)/$ ?seite=$1 [L]

I use the same rules for many other links and it works fine, but only in this case not

© Stack Overflow or respective owner

Related posts about php

Related posts about mod-rewrite