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 (IMG:http://forum.php.pl/style_emoticons/default/rolleyes.gif)

Gdzie jest blad?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
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

Posty w temacie
- Luke   mod_rewrite ... regexp   16.12.2003, 11:54:17
- - Luke   Prosze, o to rozwiazanie problemu ... KodRewriteE...   16.12.2003, 21:42:33


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: 3.10.2025 - 05:05