Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> [PHP][.htaccess] Przyjazny link
menhils
post
Post #1





Grupa: Zarejestrowani
Postów: 32
Pomógł: 0
Dołączył: 6.01.2012

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


Ten link służy do wyświetlenia profilu:
http://.........../index.php?action=profil&profil=pokaz&id=1 - Jak zrobić z tego przyjazny link?

Tak to wygląda w php
  1. index.php?action=profil&profil=pokaz&id='.$user_data['user_id'].'


A to plik .htaccess:

  1. Options FollowSymLinks
  2. RewriteEngine On
  3.  
  4. RewriteRule ^index.html$ index.php [L]
  5. RewriteRule ^profil.html$ index.php?action=profil [L]
  6. RewriteRule ^edytuj_profil.html$ index.php?action=profil&profil=edytuj [L]
  7. RewriteRule ^lista_uzytkownikow.html$ index.php?action=profil&profil=lista [L]


Jak zrobić z tego przyjazny link


--------------------
http://golden-towns.tk/ - Gra połączona za zarabianiem
Go to the top of the page
+Quote Post
Pacio
post
Post #2





Grupa: Zarejestrowani
Postów: 105
Pomógł: 27
Dołączył: 30.10.2005
Skąd: Lublin

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


Kod
RewriteRule ^profil-([0-9]+).html$ index.php?action=profil&profil=pokaz&id=$1 [L]


--------------------
Mój Blog Militarny: http://1rBlog.pl
Go to the top of the page
+Quote Post
menhils
post
Post #3





Grupa: Zarejestrowani
Postów: 32
Pomógł: 0
Dołączył: 6.01.2012

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


Dzięki działa. Leci +


--------------------
http://golden-towns.tk/ - Gra połączona za zarabianiem
Go to the top of the page
+Quote Post

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 Aktualny czas: 22.08.2025 - 01:10