Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [inne]htaccess Rewrite
smiady
post
Post #1





Grupa: Zarejestrowani
Postów: 137
Pomógł: 2
Dołączył: 2.07.2007
Skąd: Ostrzeszów

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


Witam mam takie reguły w htaccess

  1. RewriteEngine On
  2.  
  3. RewriteRule ^([a-zA-Z0-9-z\-\_]+)$ index.php?page=$1
  4. RewriteRule ^([a-zA-Z0-9-z\-\_]+)/$ index.php?page=$1
  5. RewriteRule ^([a-zA-Z0-9-z\-\_]+)/([a-zA-Z0-9-z\-\_]+)$ index.php?page=$1&subpage=$2
  6. RewriteRule ^([a-zA-Z0-9-z\-\_]+)/([a-zA-Z0-9-z\-\_]+)/$ index.php?page=$1&subpage=$2
  7. RewriteRule ^([a-zA-Z0-9-z\-\_]+)/([a-zA-Z0-9-z\-\_]+)/([a-zA-Z0-9-z\-\_]+)$ index.php?page=$1&subpage=$2&param1=$3
  8. RewriteRule ^([a-zA-Z0-9-z\-\_]+)/([a-zA-Z0-9-z\-\_]+)/([a-zA-Z0-9-z\-\_]+)/$ index.php?page=$1&subpage=$2&param1=$3


Mam ścieżkę upload/license/dokument.jpg i chce aby ją odpaliło, ale bez nadpisywania jako index.php?page= jaką regułę należy dodać ?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
trueblue
post
Post #2





Grupa: Zarejestrowani
Postów: 6 807
Pomógł: 1828
Dołączył: 11.03.2014

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


Mój błąd. Przed każdą regułą taki warunek. Jeśli drugi warunek to wystarczy przed regułą, która dopasowuje się do podanej ścieżki.
Go to the top of the page
+Quote Post

Posty w temacie


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: 8.10.2025 - 22:25