Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [apache] .htaccess
--andrew--
post
Post #1





Goście







Witam
chcialbym aby wszystkie wyolania:

http://mojastrona.pl/(.*?)

przekierowane zostaly na:
http://mojastrona.pl/index.php?get=$1

ewentualnie ten $1 mogby zostac zakodwany np. w base64 aby skrypt sobie z nim poradzil... jak napisac taka regule rewrite?

z gory tnx za pomoc.
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
--andrzej--
post
Post #2





Goście







Twoj przyklad nie dziala.....

mam cos takiego:

RewriteEngine on
RewriteCond $1 !^([a-zA-z0-9/])
RewriteRule ^(.*)$ index.php [L]
RewriteCond $1 !^(index.php)
RewriteRule ^(.*)$ index.php/$1 [L]

tylko ze cos mi sie widzi, ze ten przyklad jest bez sensu skomplikowany,
sciezke wywolania dostaje elegancko w $_SERVER, wiec GET jest mi juz nie potrzebny,
problem polega na tym, ze jesli wpisuje w URLu index.php.. to tego juz nie widze w htt[_request... jak to poprawic i skrocic ogolnie te warunki, kiepsko u mnie z kumaniem takich rzeczy
z gory dzieki za pomoc.
Go to the top of the page
+Quote Post

Posty w temacie
- -andrew-   [apache] .htaccess   1.08.2008, 22:22:07
- - -andrzej-   Zle napisalem, nie chodzi mi o przekierowanie a ty...   1.08.2008, 22:26:00
- - dadexix   RewriteRule /(.*) /index\.php\?get=...   1.08.2008, 22:27:52
- - -andrzej-   Twoj przyklad nie dziala..... mam cos takiego: R...   1.08.2008, 22:41:35
- - dadexix   KodRewriteEngine On RewriteBase / RewriteRule ^/ ...   1.08.2008, 22:48:15
- - -andrzej-   Ten przyklad rowniez nie dziala, blad 404....   1.08.2008, 22:52:37


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: 12.10.2025 - 02:28