Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> RewriteRule i instrukcja warunkowa, jak wrzucić wyrażenie rugularne w rewriterule?
Athlan
post
Post #1





Grupa: Developerzy
Postów: 823
Pomógł: 12
Dołączył: 18.12.2005

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


ModRewrite uczyłem się z tego artykułu:
http://haxite.org/index.php3?site=artykul&...view&id=589

i teraz mam pytanie:

Kod
RewriteEngine On
RewriteBase /

RewriteRule [a-z]/(.+) -/$2?user=$1
RewriteRule [a-z]/ -/index.php?user=$1


chciałbym żeby [a-z] z linii 4 i 5 było brane pod uwagę jako $1

pozdrawiam (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)

ps. wystarczy je zamienic na (.+) i dziala, ale chce żeby ten string był z zakrezu liter a-z (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 2)
stloyd
post
Post #2





Grupa: Zarejestrowani
Postów: 23
Pomógł: 2
Dołączył: 17.06.2004

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


Kod
RewriteEngine On
RewriteBase /

RewriteRule [a-z]/(.+) -/$2?user=$1
RewriteRule [a-z]/ -/index.php?user=$1

(IMG:http://forum.php.pl/style_emoticons/default/blink.gif)

Kod
RewriteEngine On
RewriteBase /

RewriteRule ([a-z]+)/(.+)$ $2?user=$1 [L]
RewriteRule ([a-z]+)/$ index.php?user=$1 [L]

(IMG:http://forum.php.pl/style_emoticons/default/winksmiley.jpg)

Pozdrawiam (;
Go to the top of the page
+Quote Post
Athlan
post
Post #3





Grupa: Developerzy
Postów: 823
Pomógł: 12
Dołączył: 18.12.2005

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


@stloyd - dziala miszczu (IMG:http://forum.php.pl/style_emoticons/default/tongue.gif)
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: 22.12.2025 - 14:03