mod rewrite в lighttpd

Печать RSS
112

V
Автор
Пришелец
0
Ктото сталкивался?
Переписую мод реврайт для с apache для lighttpd

RewriteRule ^([0-9]+)/*$ ./index.php?id=$1 [QSA,NC]
RewriteRule ^([0-9]+)/([0-9]+)/*$ ./index.php?id=$1&page=$2 [QSA,NC]
RewriteRule ^onpage/([0-9]+)/([0-9]+)/*$ ./index.php?onpage=$1&id=$2 [QSA,NC]
RewriteRule ^sort/([a-z]+)/([0-9]+)/*$ ./index.php?sort=$1&id=$2 [QSA,NC]
RewriteRule ^prew/([0-9]+)/([0-9]+)/*$ ./index.php?prew=$1&id=$2 [QSA,NC]

RewriteRule ^view/([0-9]+)/*$ ./view.php?id=$1 [QSA,NC]
RewriteRule ^view/([0-9]+)/frame([0-9]*)/*$ ./view.php?id=$1&frame=$2 [QSA,NC]
RewriteRule ^view/([0-9]+)/([0-9]+)/*$ ./view.php?id=$1&eval=$2 [QSA,NC]
RewriteRule ^view/([0-9]+)/abuse/*$ ./view.php?id=$1&abuse=1 [QSA,NC]
RewriteRule ^view/([0-9]+)/email/*$ ./view.php?id=$1&email=1 [QSA,NC]

RewriteRule ^ffmpeg/([0-9]+)/*([0-9]*)/*$ ./ffmpeg.php?id=$1&frame=$2 [QSA,NC]

RewriteRule ^im/([0-9]+)/*$ ./im.php?id=$1 [QSA,NC]
RewriteRule ^theme/([0-9]+)/*$ ./theme.php?id=$1 [QSA,NC]
RewriteRule ^load/([0-9]+)/*$ ./load.php?id=$1 [QSA,NC]
RewriteRule ^user/([0-9]+)/*$ ./user.php?id=$1 [QSA,NC]
RewriteRule ^rate/([0-9]+)/*$ ./rate.php?i=$1 [QSA,NC]
RewriteRule ^cut/([0-9]+)/*$ ./cut.php?id=$1 [QSA,NC]
RewriteRule ^txt_zip/([0-9]+)/*$ ./txt_zip.php?id=$1 [QSA,NC]
RewriteRule ^txt_jar/([0-9]+)/*$ ./txt_jar.php?id=$1 [QSA,NC]
RewriteRule ^jad/([0-9]+)/*$ ./jad.php?id=$1 [QSA,NC]

RewriteRule ^search/([0-9]+)/([0-9]+)/([0-9]+)/(.*)/*$ ./search.php?act=search&page=$1&onpage=$2&prew=$3&word=$4 [QSA,NC]

RewriteRule ^top/([a-z]+)/*([0-9]*)/*$ ./top.php?sort=$1&page=$2 [QSA,NC]

RewriteRule ^zip/([0-9]+)/*([0-9]*)/*$ ./zip.php?id=$1&page=$2 [QSA,NC]
RewriteRule ^zip/preview/([0-9]+)/(.+)/([0-9]*)/*$ ./zip.php?action=preview&id=$1&open=$2&page=$3 [QSA,NC]
RewriteRule ^zip/down/([0-9]+)/(.+)/*$ ./zip.php?action=down&id=$1&open=$2 [QSA,NC]

RewriteRule ^komm/([0-9]+)/*([0-9]*)/*(add)*/*$ ./komm.php?id=$1&page=$2&act=$3 [QSA,NC]

RewriteRule ^news_komm/([0-9]+)/*([0-9]*)/*(add)*/*$ ./news_komm.php?id=$1&page=$2&act=$3 [QSA,NC]
RewriteRule ^news/([0-9]+)/*$ ./news.php?page=$1 [QSA,NC]

RewriteRule ^read/([0-9]+)/*([0-9]*)/*$ ./read.php?id=$1&page=$2 [QSA,NC] 
Изменил: VolBog (28.09.2014 / 02:03)
V
Автор
Пришелец
0
а вот что в конфиги записую
url.rewrite = (
        "([0-9]+)/*$" => "/index.php?id=$1",
        "([0-9]+)/([0-9]+)/*$" => "/index.php?id=$1&page=$2",
        "onpage/([0-9]+)/([0-9]+)/*$" => "/index.php?onpage=$1&id=$2",
        "sort/([a-z]+)/([0-9]+)/*$" => "/index.php?sort=$1&id=$2",
        "prew/([0-9]+)/([0-9]+)/*$" => "/index.php?prew=$1&id=$2",
        "view/([0-9]+)/*$" => "/view.php?id=$1",
        "view/([0-9]+)/([0-9]+)/*$" => "./view.php?id=$1&eval=$2",
        "view/([0-9]+)/frame([0-9]*)/*$" => "./view.php?id=$1&frame=$2",
        "im/([0-9]+)/*$" => "./im.php?id=$1",
        "^user/([0-9]+)/*$" => "/user.php?id=$1"
)
но не получаю коректной работи!
точней некоректно передаютса get запроси

ВЕЛИКИЙ и УЖАСНЫЙ!
0
МБ его включить надо для начала?
V
Автор
Пришелец
0
3. SNELS, в modules добавил mod_rewrite так оно работает но некоректно
Стикеры / Теги / Правила / Топ тем / Топ постов / Поиск