Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Mod Rewrite - wykluczenie katalogu
Fallout
post
Post #1





Grupa: Zarejestrowani
Postów: 154
Pomógł: 0
Dołączył: 17.12.2003
Skąd: Olsztyn

Ostrzeżenie: (0%)
-----


Witam,

.htaccess w głównym katalogu:

Cytat
php_value post_max_size 150M
php_value upload_max_filesize 150M
php_value memory_limit 32M
RewriteEngine On
Options FollowSymLinks
php_flag session.use_trans_sid off
RewriteRule ^(.*),(.*),(.*)\.html$ index.php?lg=$1&page=$2&val=$3 [L,NC,NS]
RewriteRule ^(.*),(.*)\.html$ index.php?lg=$1&page=$2 [L,NC,NS]
RewriteRule ^(.*)\.html$ index.php?&lg=$1 [L,NC,NS,QSA]


i wszystko chodzi jak ta lala oprócz tego, że posiadam podkatalog /panel i tam właśnie te formułki powodują niezły bajzel (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
Jak wykluczyć ten katalog? Probowałem opcji z http://httpd.apache.org/docs/1.3/mod/mod_r...tml#RewriteRule
ale bezskutecznie (IMG:http://forum.php.pl/style_emoticons/default/sciana.gif)

z góry dzięki za pomoc
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 6)
Cezar708
post
Post #2





Grupa: Zarejestrowani
Postów: 1 116
Pomógł: 119
Dołączył: 10.05.2005
Skąd: Poznań

Ostrzeżenie: (0%)
-----


a nie możez w podkatalogu /panel dodać plik .htaccess z treścią deny from all nie musisz się bawić ustawianiem .htaccess w głónym katalogu i myślę, że to powinno wystarczyć.

Pozdrawiam
Go to the top of the page
+Quote Post
webdice
post
Post #3


Developer


Grupa: Moderatorzy
Postów: 3 045
Pomógł: 290
Dołączył: 20.01.2007




Kod
php_value post_max_size 150M
php_value upload_max_filesize 150M
php_value memory_limit 32M
RewriteEngine On
Options FollowSymLinks
php_flag session.use_trans_sid off

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*),(.*),(.*)\.html$ index.php?lg=$1&page=$2&val=$3 [L,NC,NS]
RewriteRule ^(.*),(.*)\.html$ index.php?lg=$1&page=$2 [L,NC,NS]
RewriteRule ^(.*)\.html$ index.php?&lg=$1 [L,NC,NS,QSA]
Go to the top of the page
+Quote Post
Fallout
post
Post #4





Grupa: Zarejestrowani
Postów: 154
Pomógł: 0
Dołączył: 17.12.2003
Skąd: Olsztyn

Ostrzeżenie: (0%)
-----


deny for all powoduje że mam 403 i tyle w panelu.

drugi sposób niestety nie działa (IMG:http://forum.php.pl/style_emoticons/default/sad.gif)

dodam jeszcze że w w katalogu panel mam tez index.php i podczas jego dzialania jest jakby includowany index z glownego katalogu.
No jakaś masakra poprostu (IMG:http://forum.php.pl/style_emoticons/default/sad.gif)
Go to the top of the page
+Quote Post
webdice
post
Post #5


Developer


Grupa: Moderatorzy
Postów: 3 045
Pomógł: 290
Dołączył: 20.01.2007




Spróbuj jeszcze:

Kod
php_value post_max_size 150M
php_value upload_max_filesize 150M
php_value memory_limit 32M
RewriteEngine On
Options FollowSymLinks
php_flag session.use_trans_sid off

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^(.*),(.*),(.*)\.html$ index.php?lg=$1&page=$2&val=$3 [L,NC,NS]
RewriteRule ^(.*),(.*)\.html$ index.php?lg=$1&page=$2 [L,NC,NS]
RewriteRule ^(.*)\.html$ index.php?&lg=$1 [L,NC,NS,QSA]


A jak nie zadziała to wklej pusty plik .htaccess do katalogu panel.

Ten post edytował webdicepl 9.03.2008, 23:31:30
Go to the top of the page
+Quote Post
Fallout
post
Post #6





Grupa: Zarejestrowani
Postów: 154
Pomógł: 0
Dołączył: 17.12.2003
Skąd: Olsztyn

Ostrzeżenie: (0%)
-----


też nic...

Cytat
[QUERY_STRING] => modul=szablony&akcja=edycja&id=1
[REQUEST_METHOD] => GET
[REQUEST_URI] => /strony/podwawelem/panel/admin.php?modul=szablony&akcja=edycja&id=1
[SCRIPT_NAME] => /strony/podwawelem/panel/admin.php
[SCRIPT_FILENAME] => /strony/podwawelem/panel/admin.php
[SCRIPT_URL] => /strony/podwawelem/panel/admin.php
[SCRIPT_URI] => http://xxxxxxxxx.home.pl/strony/podwawelem/panel/admin.php
[DOCUMENT_ROOT] => /


wyglada ok ale...

Cytat
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /strony/podwawelem/_inc/class.db.php on line 50

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /strony/podwawelem/_inc/class.db.php on line 50

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /strony/podwawelem/_inc/class.db.php on line 50

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /strony/podwawelem/_inc/class.db.php on line 50


po zobaczeniu zapytań są one wywoływane z includów z pliku index.php (www.strona.com/index.php) w głównym katalogu co jest totalnym bezsensem... zmieniłem też nazwę na admin.php (www.strona.com/panel/admin.php), pusty .htaccess w /panel istnieje..

serwer na home, może coś u nich?


............................edit..................
bledy sie nie pokazuja gdy jest jedna zmienna w get.. ale przy 3 np.
admin.php?modul=szablony&akcja=edycja&id=1
moze to cos podpowiada?

Ten post edytował Fallout 9.03.2008, 23:47:14
Go to the top of the page
+Quote Post
lusaczek
post
Post #7





Grupa: Zarejestrowani
Postów: 11
Pomógł: 1
Dołączył: 20.03.2007

Ostrzeżenie: (0%)
-----


Wie już ktoś jak rozwiązać ten problem? Z manuala wynika że rozwiązanie mogłoby być takie:

Kod
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f

...ale niestety mi to nie działa! Czemu?!
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 14.09.2025 - 16:41