Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [POMOC][HTACCASS]
Hester
post 10.04.2012, 20:08:25
Post #1





Grupa: Zarejestrowani
Postów: 6
Pomógł: 0
Dołączył: 25.01.2011

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


Hej, mam mały problem mianowicie potrzebuje zmian w linkach, aktualnie jest:

http://strona.pl/kontakt (http://strona.pl/index.php?action=kontakt);
http://strona.pl/post/artykul (http://strona.pl/index.php?action=post&ca=artykul);

chcę usunąć /post by miało to postać
http://strona.pl/artykul

.htaccess

RewriteRule ^([^/]+)$ index.php?action=$1 [L]
RewriteRule ^post/([^/]+)/?$ index.php?action=post&ca=$1 [L]

z tym że jak po prostu usunę /post to zwraca mi błąd tj pętle przekierowywań.
jakieś pomysły na to aby pozbyć się /post ale przy tym wszystko działało ?
z góry sorry jeśli nie ten dział


Ten post edytował Hester 10.04.2012, 20:20:28
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
ethann
post 10.04.2012, 23:19:30
Post #2





Grupa: Zarejestrowani
Postów: 56
Pomógł: 18
Dołączył: 7.04.2012

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


Kod
RewriteCond %{REQUEST_URI} !^/?index\.php
RewriteRule ^([^/]+)/?$ index.php?action=post&ca=$1 [L]

Sprawdź taki zapis.

Ten post edytował ethann 11.04.2012, 07:09:33
Go to the top of the page
+Quote Post

Posty w temacie


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 Wersja Lo-Fi Aktualny czas: 14.08.2025 - 18:38