Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [.htaccess] Problem z przeniesieniem zmiennej $_GET
Barton
post 7.11.2008, 22:36:48
Post #1





Grupa: Zarejestrowani
Postów: 70
Pomógł: 2
Dołączył: 26.10.2008

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


Witam,

Posiadam taki plik .htaccess:

Kod
RewriteEngine on
#html to php
RewriteCond   %{REQUEST_FILENAME} !-f
RewriteCond   %{REQUEST_FILENAME} (.*)\.html
RewriteRule   ^(.+)\.html(\?.*)? $1.php$2 [E=WasHTML:yes]
RewriteCond   %{ENV:WasHTML} ^yes$
RewriteCond   %{REQUEST_FILENAME} !-f
RewriteRule   ^(.+)\.php(\?.*)? $1.html$2

RewriteRule ^konto/ucp/poczta/usun/sender/([^-]*).html$ ./ucp_poczta.php?mode=delete&id=$i&what=sent


Po wywolaniu adresu przykładowo xxx.pl/konto/ucp/poczta/usun/sender/3.html, $_GET['id'] zwraca mi poprostu $i. Co jest nie tak? Wybaczcie, nie znam się zabardzo na mod_rewrite. winksmiley.jpg
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 2)
cbagov
post 7.11.2008, 22:48:22
Post #2





Grupa: Zarejestrowani
Postów: 181
Pomógł: 18
Dołączył: 19.04.2008

Ostrzeżenie: (10%)
X----


$i czy $1 ?

w ...........delete&id=$i&what=sent
Go to the top of the page
+Quote Post
Barton
post 7.11.2008, 22:50:26
Post #3





Grupa: Zarejestrowani
Postów: 70
Pomógł: 2
Dołączył: 26.10.2008

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


Nie $1... $i. Odrazu lepiej. Dzięki! ;]

Ten post edytował Barton 7.11.2008, 22:50:56
Go to the top of the page
+Quote Post

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

 



RSS Wersja Lo-Fi Aktualny czas: 25.06.2025 - 19:00