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
dadexix
post
Post #2





Grupa: Zarejestrowani
Postów: 439
Pomógł: 21
Dołączył: 28.06.2007
Skąd: Bielsko-Biała

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


Kod
RewriteEngine On
RewriteBase /
RewriteRule  ^/ /index.php  [L]


To powinno przepisać każdy adres rozpoczynający się od / na index.php - reszte masz w $_server

Ten post edytował dadexix 1.08.2008, 22:48:25
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 - 15:07