Autor Zpráva
Thomas123
Profil
Zdravím, mám na serveru tyto 2 htaccess s mod_rewritem

V / mám tento htaccess:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^(.*)\.xxx\.net$ [NC]
RewriteRule ^(.*) http://xxx.net/$1 [R=301,L,QSA,NE]


V /yyy mám tento htacces:

RewriteEngine On
RewriteRule ^(.*)\.p(.*)\.html$ index.php?p=$2 [L,QSA]
RewriteRule ^(.*)\.a(.*)\.html$ index.php?a=$2 [L,QSA]


Stejný htaccess jako v /yyy mám i v dalších podsložkách. Nevím, proč mi to ovšem funguje jen na půl. Jakmile někdo zadá www.xxx.net, tak ho to správně přesměruje na xxx.net, ale jakmile někdo zadá www.xxx.net/yyy/, tak to už nikam nepřesměruje (nedej bože tam ještě za /yyy něco dopsat).

1. Odstraním-li /yyy htaccess, tak vše funguje, tak jak má.
2. Jestliže přepíšu v /yyy htaccess "RewriteEngine Off", tak to stále nefunguje.
3. Jesliže smažu v tom /yyy htaccess všechno (nechám ho prázdný), tak vše funguje.

Kde dělám chybu? Alespoň mě naveďte
Thomas123
Profil
Zapnul jsem si RewriteLog na stupeň 11 (aby byla nějaká sranda).

Toto mi vylezlo při zadání www.xxx.net:
ip.ip.ip.ip - - [04/Jul/2009:12:55:34 +0200] [www.xxx.net/sid#81f5da0][rid#8363da0/initial] (3) [perdir /var/www/] strip per-dir prefix: /var/www/ -> 
ip.ip.ip.ip - - [04/Jul/2009:12:55:34 +0200] [www.xxx.net/sid#81f5da0][rid#8363da0/initial] (3) [perdir /var/www/] applying pattern '^(.*)' to uri ''
ip.ip.ip.ip - - [04/Jul/2009:12:55:34 +0200] [www.xxx.net/sid#81f5da0][rid#8363da0/initial] (4) [perdir /var/www/] RewriteCond: input='www.xxx.net' pattern='^(.*)\.xxx\.net$' [NC] => matched
ip.ip.ip.ip - - [04/Jul/2009:12:55:34 +0200] [www.xxx.net/sid#81f5da0][rid#8363da0/initial] (2) [perdir /var/www/] rewrite '' -> 'http://xxx.net/'
ip.ip.ip.ip - - [04/Jul/2009:12:55:34 +0200] [www.xxx.net/sid#81f5da0][rid#8363da0/initial] (2) [perdir /var/www/] explicitly forcing redirect with http://xxx.net/
ip.ip.ip.ip - - [04/Jul/2009:12:55:34 +0200] [www.xxx.net/sid#81f5da0][rid#8363da0/initial] (1) [perdir /var/www/] redirect to http://xxx.net/ [REDIRECT/301]
ip.ip.ip.ip - - [04/Jul/2009:12:55:35 +0200] [xxx.net/sid#81f5da0][rid#8363da0/initial] (3) [perdir /var/www/] strip per-dir prefix: /var/www/ -> 
ip.ip.ip.ip - - [04/Jul/2009:12:55:35 +0200] [xxx.net/sid#81f5da0][rid#8363da0/initial] (3) [perdir /var/www/] applying pattern '^(.*)' to uri ''
ip.ip.ip.ip - - [04/Jul/2009:12:55:35 +0200] [xxx.net/sid#81f5da0][rid#8363da0/initial] (4) [perdir /var/www/] RewriteCond: input='xxx.net' pattern='^(.*)\.xxx\.net$' [NC] => not-matched
ip.ip.ip.ip - - [04/Jul/2009:12:55:35 +0200] [xxx.net/sid#81f5da0][rid#8363da0/initial] (1) [perdir /var/www/] pass through /var/www/
ip.ip.ip.ip - - [04/Jul/2009:12:55:35 +0200] [xxx.net/sid#81f5da0][rid#836cdc0/subreq] (1) [perdir /var/www/] pass through /var/www/index.html
ip.ip.ip.ip - - [04/Jul/2009:12:55:35 +0200] [xxx.net/sid#81f5da0][rid#836edc8/subreq] (1) [perdir /var/www/] pass through /var/www/index.cgi
ip.ip.ip.ip - - [04/Jul/2009:12:55:35 +0200] [xxx.net/sid#81f5da0][rid#836cdc0/subreq] (1) [perdir /var/www/] pass through /var/www/index.pl
ip.ip.ip.ip - - [04/Jul/2009:12:55:35 +0200] [xxx.net/sid#81f5da0][rid#836edc8/subreq] (1) [perdir /var/www/] pass through /var/www/index.php
ip.ip.ip.ip - - [04/Jul/2009:12:55:35 +0200] [xxx.net/sid#81f5da0][rid#8367db0/initial] (3) [perdir /var/www/] strip per-dir prefix: /var/www/piwik/piwik.php -> piwik/piwik.php
ip.ip.ip.ip - - [04/Jul/2009:12:55:35 +0200] [xxx.net/sid#81f5da0][rid#8367db0/initial] (3) [perdir /var/www/] applying pattern '^(.*)' to uri 'piwik/piwik.php'
ip.ip.ip.ip - - [04/Jul/2009:12:55:35 +0200] [xxx.net/sid#81f5da0][rid#8367db0/initial] (4) [perdir /var/www/] RewriteCond: input='xxx.net' pattern='^(.*)\.xxx\.net$' [NC] => not-matched
ip.ip.ip.ip - - [04/Jul/2009:12:55:35 +0200] [xxx.net/sid#81f5da0][rid#8367db0/initial] (1) [perdir /var/www/] pass through /var/www/piwik/piwik.php


Toto mi vylezlo při zadání www.xxx.net/yyy/
ip.ip.ip.ip - - [04/Jul/2009:12:55:40 +0200] [www.xxx.net/sid#81f5da0][rid#8367db0/initial] (3) [perdir /var/www/yyy/] strip per-dir prefix: /var/www/yyy/ -> 
ip.ip.ip.ip - - [04/Jul/2009:12:55:40 +0200] [www.xxx.net/sid#81f5da0][rid#8367db0/initial] (3) [perdir /var/www/yyy/] applying pattern '^(.*)\.p(.*)\.html$' to uri ''
ip.ip.ip.ip - - [04/Jul/2009:12:55:40 +0200] [www.xxx.net/sid#81f5da0][rid#8367db0/initial] (3) [perdir /var/www/yyy/] strip per-dir prefix: /var/www/yyy/ -> 
ip.ip.ip.ip - - [04/Jul/2009:12:55:40 +0200] [www.xxx.net/sid#81f5da0][rid#8367db0/initial] (3) [perdir /var/www/yyy/] applying pattern '^(.*)\.a(.*)\.html$' to uri ''
ip.ip.ip.ip - - [04/Jul/2009:12:55:40 +0200] [www.xxx.net/sid#81f5da0][rid#8367db0/initial] (1) [perdir /var/www/yyy/] pass through /var/www/yyy/
ip.ip.ip.ip - - [04/Jul/2009:12:55:40 +0200] [www.xxx.net/sid#81f5da0][rid#836edc8/subreq] (3) [perdir /var/www/yyy/] strip per-dir prefix: /var/www/yyy/index.html -> index.html
ip.ip.ip.ip - - [04/Jul/2009:12:55:40 +0200] [www.xxx.net/sid#81f5da0][rid#836edc8/subreq] (3) [perdir /var/www/yyy/] applying pattern '^(.*)\.p(.*)\.html$' to uri 'index.html'
ip.ip.ip.ip - - [04/Jul/2009:12:55:40 +0200] [www.xxx.net/sid#81f5da0][rid#836edc8/subreq] (3) [perdir /var/www/yyy/] strip per-dir prefix: /var/www/yyy/index.html -> index.html
ip.ip.ip.ip - - [04/Jul/2009:12:55:40 +0200] [www.xxx.net/sid#81f5da0][rid#836edc8/subreq] (3) [perdir /var/www/yyy/] applying pattern '^(.*)\.a(.*)\.html$' to uri 'index.html'
ip.ip.ip.ip - - [04/Jul/2009:12:55:40 +0200] [www.xxx.net/sid#81f5da0][rid#836edc8/subreq] (1) [perdir /var/www/yyy/] pass through /var/www/yyy/index.html
ip.ip.ip.ip - - [04/Jul/2009:12:55:40 +0200] [www.xxx.net/sid#81f5da0][rid#8375de0/subreq] (3) [perdir /var/www/yyy/] strip per-dir prefix: /var/www/yyy/index.cgi -> index.cgi
ip.ip.ip.ip - - [04/Jul/2009:12:55:40 +0200] [www.xxx.net/sid#81f5da0][rid#8375de0/subreq] (3) [perdir /var/www/yyy/] applying pattern '^(.*)\.p(.*)\.html$' to uri 'index.cgi'
ip.ip.ip.ip - - [04/Jul/2009:12:55:40 +0200] [www.xxx.net/sid#81f5da0][rid#8375de0/subreq] (3) [perdir /var/www/yyy/] strip per-dir prefix: /var/www/yyy/index.cgi -> index.cgi
ip.ip.ip.ip - - [04/Jul/2009:12:55:40 +0200] [www.xxx.net/sid#81f5da0][rid#8375de0/subreq] (3) [perdir /var/www/yyy/] applying pattern '^(.*)\.a(.*)\.html$' to uri 'index.cgi'
ip.ip.ip.ip - - [04/Jul/2009:12:55:40 +0200] [www.xxx.net/sid#81f5da0][rid#8375de0/subreq] (1) [perdir /var/www/yyy/] pass through /var/www/yyy/index.cgi
ip.ip.ip.ip - - [04/Jul/2009:12:55:40 +0200] [www.xxx.net/sid#81f5da0][rid#836edc8/subreq] (3) [perdir /var/www/yyy/] strip per-dir prefix: /var/www/yyy/index.pl -> index.pl
ip.ip.ip.ip - - [04/Jul/2009:12:55:40 +0200] [www.xxx.net/sid#81f5da0][rid#836edc8/subreq] (3) [perdir /var/www/yyy/] applying pattern '^(.*)\.p(.*)\.html$' to uri 'index.pl'
ip.ip.ip.ip - - [04/Jul/2009:12:55:40 +0200] [www.xxx.net/sid#81f5da0][rid#836edc8/subreq] (3) [perdir /var/www/yyy/] strip per-dir prefix: /var/www/yyy/index.pl -> index.pl
ip.ip.ip.ip - - [04/Jul/2009:12:55:40 +0200] [www.xxx.net/sid#81f5da0][rid#836edc8/subreq] (3) [perdir /var/www/yyy/] applying pattern '^(.*)\.a(.*)\.html$' to uri 'index.pl'
ip.ip.ip.ip - - [04/Jul/2009:12:55:40 +0200] [www.xxx.net/sid#81f5da0][rid#836edc8/subreq] (1) [perdir /var/www/yyy/] pass through /var/www/yyy/index.pl
ip.ip.ip.ip - - [04/Jul/2009:12:55:40 +0200] [www.xxx.net/sid#81f5da0][rid#8375de0/subreq] (3) [perdir /var/www/yyy/] strip per-dir prefix: /var/www/yyy/index.php -> index.php
ip.ip.ip.ip - - [04/Jul/2009:12:55:40 +0200] [www.xxx.net/sid#81f5da0][rid#8375de0/subreq] (3) [perdir /var/www/yyy/] applying pattern '^(.*)\.p(.*)\.html$' to uri 'index.php'
ip.ip.ip.ip - - [04/Jul/2009:12:55:40 +0200] [www.xxx.net/sid#81f5da0][rid#8375de0/subreq] (3) [perdir /var/www/yyy/] strip per-dir prefix: /var/www/yyy/index.php -> index.php
ip.ip.ip.ip - - [04/Jul/2009:12:55:40 +0200] [www.xxx.net/sid#81f5da0][rid#8375de0/subreq] (3) [perdir /var/www/yyy/] applying pattern '^(.*)\.a(.*)\.html$' to uri 'index.php'
ip.ip.ip.ip - - [04/Jul/2009:12:55:40 +0200] [www.xxx.net/sid#81f5da0][rid#8375de0/subreq] (1) [perdir /var/www/yyy/] pass through /var/www/yyy/index.php
ip.ip.ip.ip - - [04/Jul/2009:12:55:42 +0200] [www.xxx.net/sid#81f5da0][rid#8365da8/initial] (3) [perdir /var/www/yyy/] strip per-dir prefix: /var/www/yyy/remote/javascript.php -> remote/javascript.php
ip.ip.ip.ip - - [04/Jul/2009:12:55:42 +0200] [www.xxx.net/sid#81f5da0][rid#8365da8/initial] (3) [perdir /var/www/yyy/] applying pattern '^(.*)\.p(.*)\.html$' to uri 'remote/javascript.php'
ip.ip.ip.ip - - [04/Jul/2009:12:55:42 +0200] [www.xxx.net/sid#81f5da0][rid#8365da8/initial] (3) [perdir /var/www/yyy/] strip per-dir prefix: /var/www/yyy/remote/javascript.php -> remote/javascript.php
ip.ip.ip.ip - - [04/Jul/2009:12:55:42 +0200] [www.xxx.net/sid#81f5da0][rid#8365da8/initial] (3) [perdir /var/www/yyy/] applying pattern '^(.*)\.a(.*)\.html$' to uri 'remote/javascript.php'
ip.ip.ip.ip - - [04/Jul/2009:12:55:42 +0200] [www.xxx.net/sid#81f5da0][rid#8365da8/initial] (1) [perdir /var/www/yyy/] pass through /var/www/yyy/remote/javascript.php
ip.ip.ip.ip - - [04/Jul/2009:12:55:43 +0200] [xxx.net/sid#81f5da0][rid#836edc8/initial] (3) [perdir /var/www/] strip per-dir prefix: /var/www/piwik/piwik.php -> piwik/piwik.php
ip.ip.ip.ip - - [04/Jul/2009:12:55:43 +0200] [xxx.net/sid#81f5da0][rid#836edc8/initial] (3) [perdir /var/www/] applying pattern '^(.*)' to uri 'piwik/piwik.php'
ip.ip.ip.ip - - [04/Jul/2009:12:55:43 +0200] [xxx.net/sid#81f5da0][rid#836edc8/initial] (4) [perdir /var/www/] RewriteCond: input='xxx.net' pattern='^(.*)\.xxx\.net$' [NC] => not-matched
ip.ip.ip.ip - - [04/Jul/2009:12:55:43 +0200] [xxx.net/sid#81f5da0][rid#836edc8/initial] (1) [perdir /var/www/] pass through /var/www/piwik/piwik.php


Pokud jsem to tedy správně pochopil, tak on to sice porovná s nadřazeným htaccessem, ale z nějakého důvodu vidí jen xxx.net? A nyní mám pokračovat jak?

Vaše odpověď


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm: