Problem z re_write


(northwest) #1

Witam serdecznie,

od 2 dni walczę z htaccesem i modrewrite.

Mam taki plik:

Options +FollowSymLinks

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule lang,(.*).html/index.php?lang=$1 [L]

RewriteCond %{REQUEST_URI} _podstrona- [NC]

RewriteRule (.*)_podstrona-(.*).html/index.php?go=$1&strona=$2 [L]

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule min_(.*)_(.*)_(.*) /min.php?$3&width=$1&height=$2 [L]

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule (.*),(.*),(.*),(.*),(.*),(.*).html/index.php?go=$1&strona=$2&akcja=$3&co=$4&ajax=$5&filtr=$6 [L]

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule (.*),(.*),(.*),(.*),(.*).html/index.php?go=$1&strona=$2&akcja=$3&co=$4&ajax=$5 [L]

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule (.*),(.*),(.*),(.*),(.*).html/index.php?go=$1&subgo=$2&strona=$3&akcja=$4&co=$5 [L]

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule (.*),(.*),(.*),(.*).html/index.php?go=$1&subgo=$2&akcja=$3&co=$4 [L]

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule (.*),(.*),(.*).html/index.php?go=$1&subgo=$2&strona=$3 [L]

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule (.*),(.*).html/index.php?go=$1&subgo=$2 [L]

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule (.*).html/index.php?go=$1 [L]

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule admin(.*)/index.php?go=admin$1 [L]

RewriteCond %{REQUEST_FILENAME} !-d

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule wyloguj/index.php?go=wyloguj [L]

Po kliknięciu odnośnika przeglądarka zwraca "nie ma takiej strony". W logach mam takie coś:

89.79.39.132 - - [13/Oct/2009:22:45:39 +0200] [domena.pl/sid#8240bd0][rid#83d9d40/initial] (2) init rewrite engine with requested uri /

89.79.39.132 - - [13/Oct/2009:22:45:39 +0200] [domena.pl/sid#8240bd0][rid#83d9d40/initial] (1) pass through /

89.79.39.132 - - [13/Oct/2009:22:45:39 +0200] [domena.pl/sid#8240bd0][rid#83d9d40/initial] (3) [perdir /var/www/strony/domena.pl/] strip per-dir prefix: /var/www/strony/domena.pl/ -> 

89.79.39.132 - - [13/Oct/2009:22:45:39 +0200] [domena.pl/sid#8240bd0][rid#83d9d40/initial] (3) [perdir /var/www/strony/domena.pl/] applying pattern 'lang,(.*).html/index.php?lang=$1' to uri ''

89.79.39.132 - - [13/Oct/2009:2:45:39 +0200] [domena.pl/sid#8240bd0][rid#83d9d40/initial] (3) [perdir /var/www/strony/domena.pl/] strip per-dir prefix: /var/www/strony/domena.pl/ -> 

89.79.39.132 - - [13/Oct/2009:22:45:39 +0200] [domena.pl/sid#8240bd0][rid#83d9d40/initial] (3) [perdir /var/www/strony/domena.pl/] applying pattern '(.*)_podstrona-(.*).html/index.php?go=$1&strona=$2' to uri ''

89.79.39.132 - - [13/Oct/2009:22:45:39 +0200] [domena.pl/sid#8240bd0][rid#83d9d40/initial] (3) [perdir /var/www/strony/domena.pl/] strip per-dir prefix: /var/www/strony/domena.pl/ -> 

89.79.39.132 - - [13/Oct/2009:22:45:39 +0200] [domena.pl/sid#8240bd0][rid#83d9d40/initial] (3) [perdir /var/www/strony/domena.pl/] applying pattern 'min_(.*)_(.*)_(.*)' to uri ''

89.79.39.132 - - [13/Oct/2009:22:45:39 +0200] [domena.pl/sid#8240bd0][rid#83d9d40/initial] (3) [perdir /var/www/strony/domena.pl/] strip per-dir prefix: /var/www/strony/domena.pl/ -> 

89.79.39.132 - - [13/Oct/2009:22:45:39 +0200] [domena.pl/sid#8240bd0][rid#83d9d40/initial] (3) [perdir /var/www/strony/domena.pl/] applying pattern '(.*),(.*),(.*),(.*),(.*),(.*).html/index.php?go=$1&strona=$2&akcja=$3&co=$4&ajax=$5&filtr=$6' to uri ''

89.79.39.132 - - [13/Oct/2009:22:45:39 +0200] [domena.pl/sid#8240bd0][rid#83d9d40/initial] (3) [perdir /var/www/strony/domena.pl/] strip per-dir prefix: /var/www/strony/domena.pl/ -> 

89.79.39.132 - - [13/Oct/2009:22:45:39 +0200] [domena.pl/sid#8240bd0][rid#83d9d40/initial] (3) [perdir /var/www/strony/domena.pl/] applying pattern '(.*),(.*),(.*),(.*),(.*).html/index.php?go=$1&strona=$2&akcja=$3&co=$4&ajax=$5' to uri ''

89.79.39.132 - - [13/Oct/2009:22:45:39 +0200] [domena.pl/sid#8240bd0][rid#83d9d40/initial] (3) [perdir /var/www/strony/domena.pl/] strip per-dir prefix: /var/www/strony/domena.pl/ -> 

89.79.39.132 - - [13/Oct/2009:22:45:39 +0200] [domena.pl/sid#8240bd0][rid#83d9d40/initial] (3) [perdir /var/www/strony/domena.pl/] applying pattern '(.*),(.*),(.*),(.*),(.*).html/index.php?go=$1&subgo=$2&strona=$3&akcja=$4&co=$5' to uri ''

89.79.39.132 - - [13/Oct/2009:22:45:39 +0200] [domena.pl/sid#8240bd0][rid#83d9d40/initial] (3) [perdir /var/www/strony/domena.pl/] strip per-dir prefix: /var/www/strony/domena.pl/ -> 

89.79.39.132 - - [13/Oct/2009:22:45:39 +0200] [domena.pl/sid#8240bd0][rid#83d9d40/initial] (3) [perdir /var/www/strony/domena.pl/] applying pattern '(.*),(.*),(.*),(.*).html/index.php?go=$1&subgo=$2&akcja=$3&co=$4' to uri ''

89.79.39.132 - - [13/Oct/2009:22:45:39 +0200] [domena.pl/sid#8240bd0][rid#83d9d40/initial] (3) [perdir /var/www/strony/domena.pl/] strip per-dir prefix: /var/www/strony/domena.pl/ -> 

89.79.39.132 - - [13/Oct/2009:22:45:39 +0200] [domena.pl/sid#8240bd0][rid#83d9d40/initial] (3) [perdir /var/www/strony/domena.pl/] applying pattern '(.*),(.*),(.*).html/index.php?go=$1&subgo=$2&strona=$3' to uri ''

89.79.39.132 - - [13/Oct/2009:22:45:39 +0200] [domena.pl/sid#8240bd0][rid#83d9d40/initial] (3) [perdir /var/www/strony/domena.pl/] strip per-dir prefix: /var/www/strony/domena.pl/ -> 

89.79.39.132 - - [13/Oct/2009:22:45:39 +0200] [domena.pl/sid#8240bd0][rid#83d9d40/initial] (3) [perdir /var/www/strony/domena.pl/] applying pattern '(.*),(.*).html/index.php?go=$1&subgo=$2' to uri ''

89.79.39.132 - - [13/Oct/2009:22:45:39 +0200] [domena.pl/sid#8240bd0][rid#83d9d40/initial] (3) [perdir /var/www/strony/domena.pl/] strip per-dir prefix: /var/www/strony/domena.pl/ -> 

89.79.39.132 - - [13/Oct/2009:22:45:39 +0200] [domena.pl/sid#8240bd0][rid#83d9d40/initial] (3) [perdir /var/www/strony/domena.pl/] applying pattern '(.*).html/index.php?go=$1' to uri ''

89.79.39.132 - - [13/Oct/2009:22:45:39 +0200] [domena.pl/sid#8240bd0][rid#83d9d40/initial] (3) [perdir /var/www/strony/domena.pl/] strip per-dir prefix: /var/www/strony/domena.pl/ -> 

89.79.39.132 - - [13/Oct/2009:22:45:39 +0200] [domena.pl/sid#8240bd0][rid#83d9d40/initial] (3) [perdir /var/www/strony/domena.pl/] applying pattern 'admin(.*)/index.php?go=admin$1' to uri ''

89.79.39.132 - - [13/Oct/2009:22:45:39 +0200] [domena.pl/sid#8240bd0][rid#83d9d40/initial] (3) [perdir /var/www/strony/domena.pl/] strip per-dir prefix: /var/www/strony/domena.pl/ -> 

89.79.39.132 - - [13/Oct/2009:22:45:39 +0200] [domena.pl/sid#8240bd0][rid#83d9d40/initial] (3) [perdir /var/www/strony/domena.pl/] applying pattern 'wyloguj/index.php?go=wyloguj' to uri ''

89.79.39.132 - - [13/Oct/2009:22:45:39 +0200] [domena.pl/sid#8240bd0][rid#83d9d40/initial] (1) [perdir /var/www/strony/domena.pl/] pass through /var/www/strony/domena.pl/

89.79.39.132 - - [13/Oct/2009:22:45:39 +0200] [domena.pl/sid#8240bd0][rid#83d37f8/subreq] (2) init rewrite engine with requested uri /index.html

89.79.39.132 - - [13/Oct/2009:22:45:39 +0200] [domena.pl/sid#8240bd0][rid#83d37f8/subreq] (1) pass through /index.html

Co dziwne, to na Windowsowym apache chodziło poprawnie...

linki mają np. taką postać:

transakcje-nowe,16.html

aukcje-zakonczone.html

Wie ktoś może dlaczego to nie chce zaskoczyć?

Z góry dzięki za pomoc,

Łukasz


(Sitemaster) #2

Porozdzielaj ciągi, daj spację po html, ma być

No i ten / przed index też jest chyba zbedny