Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> mod_rewrite ... regexp
Luke
post
Post #1





Grupa: Przyjaciele php.pl
Postów: 215
Pomógł: 0
Dołączył: 28.10.2003
Skąd: -

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


Witam,

Bardzo prosze o pomoc w napisaniu reguly dla http://www.przyklad.com/polish/index.php?s...ain&id=(liczba)

Chce uzyskac adres http://www.przyklad.com/polish/main/(liczba).php

lub

http://www.przyklad.com/polish/main/(liczba).php

Adres ma stala struktue, zmienia sie tylko id

RewriteEngine on
RewriteBase /polish
RewriteRule ^/(.*)/(.*).php$ index.php?sub=$2&id=$1 [L]

Niestety nie dziala rolleyes.gif

Gdzie jest blad?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 1)
Luke
post
Post #2





Grupa: Przyjaciele php.pl
Postów: 215
Pomógł: 0
Dołączył: 28.10.2003
Skąd: -

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


Prosze, o to rozwiazanie problemu ...

Kod
RewriteEngine on

RewriteCond %{QUERY_STRING} ^id=(.*)$

RewriteRule ^polish/index.php$ /main/%1.php [L]


... moze ktos tego bedzie kiedys szukal?
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 Aktualny czas: 22.08.2025 - 02:26