Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Poprawienie wyglądu linku do profilu
Parrot
post 18.01.2015, 00:23:32
Post #1





Grupa: Zarejestrowani
Postów: 5
Pomógł: 0
Dołączył: 30.08.2014

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


Hey.
Mam pewien problem. Aktualnie w folderze root mam plik user.php.
Po wprowadzeniu do niego wartości username typu GET (np. user.php?username=Parrot) wyświetla się nasz profil.
Tu zaczynają się schody. Chciałbym aby link do profilu wyglądał tak:
localhost/user/Parrot
Wiem, że potrzeba do tego php i odpowiedniej formułki w htacess.
Z góry wielkie dzięki za pomoc smile.gif
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
Pyton_000
post 18.01.2015, 01:51:01
Post #2





Grupa: Zarejestrowani
Postów: 8 068
Pomógł: 1414
Dołączył: 26.10.2005

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


.htaccess

RewriteRule ^user/([^/]+)$ index.php?username=$1 [L,NC]
Go to the top of the page
+Quote Post
Parrot
post 19.01.2015, 17:12:31
Post #3





Grupa: Zarejestrowani
Postów: 5
Pomógł: 0
Dołączył: 30.08.2014

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


Cytat(Pyton_000 @ 18.01.2015, 01:51:01 ) *
.htaccess

RewriteRule ^user/([^/]+)$ index.php?username=$1 [L,NC]


"The requested URL /user.php was not found on this server."



Plik istnieje i mimo to dostaję błąd.
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: 23.06.2025 - 12:11